-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
63 lines (60 loc) · 1.87 KB
/
Copy pathflake.nix
File metadata and controls
63 lines (60 loc) · 1.87 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
description = "Flux — DNS Selector & Network Configurator";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
extensions = [ "rust-src" "clippy" "rustfmt" ];
};
manifest = builtins.fromTOML (builtins.readFile ./Cargo.toml);
in
{
packages.default = pkgs.rustPlatform.buildRustPackage {
pname = manifest.package.name;
version = manifest.package.version;
src = pkgs.lib.cleanSource ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
nativeBuildInputs = [ pkgs.installShellFiles ];
buildFeatures = [ "tui" ];
doCheck = false;
postInstall = ''
installManPage man/dns.1
'';
meta = with pkgs.lib; {
description = manifest.package.description;
homepage = manifest.package.homepage;
license = licenses.gpl3Plus;
maintainers = [ "Mohamed Hammad <Mohamed.Hammad@SpacecraftSoftware.org>" ];
mainProgram = "dns";
};
};
devShells.default = pkgs.mkShell {
buildInputs = [
rustToolchain
pkgs.cargo-deny
pkgs.cargo-audit
pkgs.jaq
pkgs.dogdns
pkgs.eza
pkgs.bat
pkgs.fd
pkgs.procs
pkgs.bottom
];
};
});
}