flake.nix: fix buildRustPackage targets

This commit is contained in:
Astro 2021-11-09 01:24:26 +01:00
parent 3455a8d579
commit 66ff9f0c30
1 changed files with 2 additions and 0 deletions

View File

@ -25,6 +25,7 @@
buildRustPackage = args: naersk-lib.buildPackage ({ buildRustPackage = args: naersk-lib.buildPackage ({
src = ./.; src = ./.;
targets = [ args.pname ]; targets = [ args.pname ];
cargoBuildOptions = opts: opts ++ [ "-p" args.pname ];
nativeBuildInputs = with pkgs; [ pkg-config ]; nativeBuildInputs = with pkgs; [ pkg-config ];
buildInputs = with pkgs; [ openssl ]; buildInputs = with pkgs; [ openssl ];
} // args); } // args);
@ -40,6 +41,7 @@
pname = "collectd-stats"; pname = "collectd-stats";
}; };
defaultPackage = packages.heliwatch; defaultPackage = packages.heliwatch;
checks = packages; checks = packages;
# `nix run` # `nix run`