Files
jj-cz/nix/package.nix

27 lines
636 B
Nix
Raw Permalink Normal View History

2026-02-05 16:25:14 +01:00
{
2026-03-08 15:44:26 +01:00
pkgs,
2026-02-05 16:25:14 +01:00
rustPlatform,
...
}: let
cargoToml = fromTOML (builtins.readFile ../Cargo.toml);
name = cargoToml.package.name;
version = cargoToml.package.version;
rustBuild = rustPlatform.buildRustPackage {
pname = name;
inherit version;
2026-03-08 15:44:26 +01:00
src = pkgs.lib.cleanSource ../.;
2026-02-05 16:25:14 +01:00
cargoLock.lockFile = ../Cargo.lock;
2026-03-08 15:44:26 +01:00
buildInputs = [ pkgs.upx ];
useNextest = true;
meta = {
description = "Conventional commits for Jujutsu";
homepage = "https://labs.phundrak.com/phundrak/jj-cz";
};
postBuild = ''
${pkgs.upx}/bin/upx target/*/release/${name}
'';
2026-02-05 16:25:14 +01:00
};
in {
default = rustBuild;
}