From e2f5e1267cc30b73202c85aacfaee0cd6b18193c Mon Sep 17 00:00:00 2001 From: cashmere Date: Tue, 21 Jul 2026 14:27:38 +0200 Subject: package with npins and nix - npins pins nixpkgs-unstable - nix/package.nix: rustPlatform.buildRustPackage with pkg-config, glib, cairo, pango and harfbuzz - default.nix exposes packages.default - ignore nix-build result symlink --- nix/package.nix | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 nix/package.nix (limited to 'nix') diff --git a/nix/package.nix b/nix/package.nix new file mode 100644 index 0000000..a9eace2 --- /dev/null +++ b/nix/package.nix @@ -0,0 +1,36 @@ +{ + lib, + rustPlatform, + pkg-config, + glib, + cairo, + pango, + harfbuzz, +}: + +let + cargoToml = builtins.fromTOML (builtins.readFile ../Cargo.toml); +in +rustPlatform.buildRustPackage { + pname = cargoToml.package.name; + version = cargoToml.package.version; + + src = ../.; + + cargoLock.lockFile = ../Cargo.lock; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ + glib + cairo + pango + harfbuzz + ]; + + meta = { + description = cargoToml.package.description; + homepage = cargoToml.package.repository; + license = lib.licenses.gpl3Only; + mainProgram = "i3bar-river"; + }; +} -- cgit v1.3.1