diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-04-10 09:25:01 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-04-10 17:38:03 +0530 |
commit | a308c61669dd80f76e79c00ac13ca17f11f7ecfd (patch) | |
tree | 1d8cf18558dadaf20ae4c0d4dd682f13e1a2b013 | |
parent | c246bc2a7e442a0157c4c6a016900c6516ff5878 (diff) |
flake/pkgs/npass: init
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | flake.nix | 42 |
2 files changed, 42 insertions, 4 deletions
@@ -19,9 +19,9 @@ Todo - [x] pass cat - [x] pass help - [ ] dbus -- [ ] nix flake +- [x] nix flake - [x] shell - - [ ] pkg + - [x] pkg Dependencies ------------ @@ -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; + }); }; } |