diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 42 |
1 files changed, 40 insertions, 2 deletions
@@ -14,11 +14,18 @@ supportedSystems = lib.platforms.unix; forAllSystems = f: lib.genAttrs supportedSystems (forSystem f); in { - devShells = forAllSystems ({ system, pkgs, ... }: { + devShells = forAllSystems ({ system, pkgs }: { default = pkgs.mkShell { name = "dev"; - buildInputs = with pkgs; [ gpgme meson ninja ccls ]; + buildInputs = with pkgs; [ + gpgme + meson + ninja + ccls + self.packages.${system}.npass + ]; + shellHook = '' [ -z "$XDG_DATA_HOME" ] && export XDG_DATA_HOME="$HOME/.local/share" @@ -27,5 +34,36 @@ ''; }; }); + + packages = forAllSystems ({ system, pkgs }: let + inherit (pkgs) meson ninja gpgme; + in { + npass = pkgs.stdenv.mkDerivation (finalAttrs: { + pname = "npass"; + version = self.shortRev or self.dirtyShortRev; + + src = ./.; + nativeBuildInputs = [ + meson + ninja + ]; + buildInputs = [ + gpgme + ]; + + meta = { + description = "A passwordstore and Secret Service API implementation"; + homepage = "https://git.sinanmohd.com/npass"; + + license = lib.licenses.gpl3Only; + platforms = supportedSystems; + mainProgram = "pass"; + + maintainers = with lib.maintainers; [ sinanmohd ]; + }; + }); + + default = self.packages.${system}.npass; + }); }; } |