refactor(flake): Now produces two packages based on enabled features
This commit is contained in:
parent
014c4f88a1
commit
a833fe8e20
2 changed files with 3 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
{ pkgs ? import <nixpkgs> { } }:
|
||||
{ pkgs ? import <nixpkgs> { }, features ? [ ] }:
|
||||
let manifest = (pkgs.lib.importTOML ./Cargo.toml).package;
|
||||
in
|
||||
pkgs.rustPlatform.buildRustPackage {
|
||||
|
@ -7,7 +7,7 @@ pkgs.rustPlatform.buildRustPackage {
|
|||
src = pkgs.lib.cleanSource ./.;
|
||||
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
buildFeatures = [ "lolcat" ];
|
||||
buildFeatures = features;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.pkg-config
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
in {
|
||||
packages = forAllSystems (system: {
|
||||
default = pkgsFor.${system}.callPackage ./. { };
|
||||
lolcat = pkgsFor.${system}.callPackage ./. { features = [ "lolcat" ]; };
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue