From 478c020579e5606299e637e5392e7a950bacc97d Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 12 Aug 2025 12:50:16 +0300 Subject: [PATCH] nix: clean up packaging Signed-off-by: NotAShelf Change-Id: I6a6a69643e155d95fbed1d10900bbe4d7ff03b15 --- flake.nix | 1 - nix/package.nix | 16 +++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index c83b859..3648b82 100644 --- a/flake.nix +++ b/flake.nix @@ -7,7 +7,6 @@ }: let systems = ["x86_64-linux" "aarch64-linux"]; forEachSystem = nixpkgs.lib.genAttrs systems; - pkgsForEach = nixpkgs.legacyPackages; in { packages = forEachSystem (system: { diff --git a/nix/package.nix b/nix/package.nix index 4bec0f5..c708c46 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -3,7 +3,7 @@ rustPlatform, }: rustPlatform.buildRustPackage (finalAttrs: { - pname = "sample-rust"; + pname = "stash"; version = "0.1.0"; src = let @@ -13,18 +13,24 @@ rustPlatform.buildRustPackage (finalAttrs: { fs.toSource { root = s; fileset = fs.unions [ - (fs.fileFilter (file: builtins.any file.hasExt ["rs"]) s + /src) + (fs.fileFilter (file: builtins.any file.hasExt ["rs"]) (s + /src)) (s + /Cargo.lock) (s + /Cargo.toml) ]; }; cargoLock.lockFile = "${finalAttrs.src}/Cargo.lock"; - useFetchCargoVendor = true; enableParallelBuilding = true; + postInstall = '' + mkdir -p $out + install -Dm755 ${../vendor/stash.service} $out/share/stash.service + ''; + meta = { - description = "Experimental nftables ruleset formatter and prettier"; - maintainers = with lib.licenses; [NotAShelf]; + description = "Wayland clipboard manager with fast persistent history and multi-media support"; + maintainers = [lib.maintainers.NotAShelf]; + license = lib.licenses.mpl20; + mainProgram = "stash"; }; })