This commit is contained in:
elwrcl committed 2026-09-26 17:09:38 +03:00
commit 6df73cc246
22 files changed
+11922

No files matched your search

+58
View File
@@ -0,0 +1,58 @@
{
description = "pasx - terminal password generator";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }:
let
systems = [ "x86_64-linux" "aarch64-linux" ];
forAllSystems = f:
nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
in
{
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = [
pkgs.cargo
pkgs.rustc
pkgs.clippy
pkgs.rustfmt
pkgs.rust-analyzer
];
};
});
packages = forAllSystems (pkgs: {
default = pkgs.rustPlatform.buildRustPackage {
pname = "pasx";
version = "0.1.0";
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
nativeBuildInputs = [ pkgs.clippy pkgs.rustfmt pkgs.makeWrapper ];
postCheck = ''
cargo clippy --all-targets -- -D warnings
cargo fmt --check
'';
postInstall = ''
mkdir -p $out/share/pasx
$out/bin/pasx completions nu > $out/share/pasx/pasx.nu
wrapProgram $out/bin/pasx \
--prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.wl-clipboard ]}
'';
meta = {
description = "Terminal password generator";
license = with pkgs.lib.licenses; [ mit asl20 ];
mainProgram = "pasx";
};
};
});
checks = forAllSystems (pkgs: {
default = self.packages.${pkgs.stdenv.hostPlatform.system}.default;
});
};
}