build: Use gitignore.nix to fetch the src
This commit is contained in:
parent
00a74bfebe
commit
ed89285fc8
2 changed files with 29 additions and 2 deletions
21
flake.lock
21
flake.lock
|
@ -18,6 +18,26 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1660459072,
|
||||
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1688859638,
|
||||
|
@ -55,6 +75,7 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
|
|
10
flake.nix
10
flake.nix
|
@ -3,9 +3,14 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
|
||||
gitignore = {
|
||||
url = "github:hercules-ci/gitignore.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs@{ flake-parts, ... }:
|
||||
outputs = inputs@{ flake-parts, gitignore, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [ "aarch64-darwin" "x86_64-linux" "aarch64-linux" ];
|
||||
|
||||
|
@ -19,6 +24,7 @@
|
|||
elixir = beamPackages.elixir_1_15;
|
||||
|
||||
inherit (pkgs.stdenv) isDarwin;
|
||||
inherit (gitignore.lib) gitignoreSource;
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.mkShell {
|
||||
|
@ -40,7 +46,7 @@
|
|||
packages.default = beamPackages.mixRelease {
|
||||
inherit pname version;
|
||||
|
||||
src = ./.;
|
||||
src = gitignoreSource ./.;
|
||||
mixNixDeps = import ./mix.nix { inherit lib beamPackages; };
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue