mirror of
https://github.com/elwrcl/pasx.git
synced 2026-10-31 19:08:04 +03:00
init
This commit is contained in:
22 files changed
+11922
No files matched your search
@@ -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;
|
||||
});
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user