-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
37 lines (36 loc) · 1.22 KB
/
flake.nix
File metadata and controls
37 lines (36 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
description = "Setup your **explo**it **d**evelopment **e**nvironment";
inputs = {
naersk.url = "github:nix-community/naersk";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
naersk.inputs.nixpkgs.follows = "nixpkgs";
fenix.url = "github:nix-community/fenix";
fenix.inputs.nixpkgs.follows = "nixpkgs";
gitignore.url = "github:hercules-ci/gitignore.nix";
gitignore.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, gitignore, nixpkgs, naersk, fenix }:
let forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
in {
packages = forAllSystems (system:
let
pkgs = import nixpkgs { inherit system; };
naersk' = pkgs.callPackage naersk { };
inherit (gitignore.lib) gitignoreSource gitignoreFilterWith;
in {
default = naersk'.buildPackage {
version =
(pkgs.lib.importTOML ./Cargo.toml).package.version;
src = pkgs.lib.cleanSourceWith {
filter = gitignoreFilterWith {
basePath = ./.;
extraRules = ''
/README.md
'';
};
src = ./.;
};
};
});
};
}