diff options
Diffstat (limited to 'nix/package.nix')
| -rw-r--r-- | nix/package.nix | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/nix/package.nix b/nix/package.nix index 778fa27..261e785 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -22,16 +22,18 @@ rustPlatform.buildRustPackage { cargoLock.lockFile = ../Cargo.lock; - nativeBuildInputs = [pkg-config]; - buildInputs = [openssl]; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ openssl ]; - env = let - toRustFlags = lib.mapAttrs' ( - name: - lib.nameValuePair - "CARGO_BUILD_RELEASE_${lib.toUpper (builtins.replaceStrings ["-"] ["_"] name)}" - ); - in + env = + let + toRustFlags = lib.mapAttrs' ( + name: + lib.nameValuePair "CARGO_BUILD_RELEASE_${ + lib.toUpper (builtins.replaceStrings [ "-" ] [ "_" ] name) + }" + ); + in lib.optionalAttrs lto (toRustFlags { lto = "thin"; }) @@ -47,6 +49,6 @@ rustPlatform.buildRustPackage { homepage = "https://github.com/getchoo/nixpkgs-tracker-bot"; mainProgram = "nixpkgs-tracker-bot"; license = lib.licenses.mit; - maintainers = [lib.maintainers.getchoo]; + maintainers = [ lib.maintainers.getchoo ]; }; } |
