cleanup flake
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
description = "A very basic flake";
|
description = "sops-tui — a TUI for managing SOPS-encrypted secrets";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
@@ -45,28 +45,23 @@
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
src = craneLib.cleanCargoSource ./.;
|
src = craneLib.cleanCargoSource ./.;
|
||||||
|
|
||||||
commonArgs = {
|
commonArgs = {
|
||||||
inherit src;
|
inherit src;
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
};
|
};
|
||||||
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
|
|
||||||
individualCrateArgs = commonArgs // {
|
|
||||||
inherit cargoArtifacts;
|
|
||||||
inherit (craneLib.crateNameFromCargoToml { inherit src; }) version;
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSetForCrate =
|
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
|
||||||
crate:
|
|
||||||
lib.fileset.toSource {
|
sops-tui = craneLib.buildPackage (
|
||||||
root = ./.;
|
commonArgs
|
||||||
fileset = lib.fileset.unions [
|
|
||||||
./Cargo.toml
|
|
||||||
./Cargo.lock
|
|
||||||
];
|
|
||||||
};
|
|
||||||
server = craneLib.buildPackage (
|
|
||||||
individualCrateArgs
|
|
||||||
// {
|
// {
|
||||||
|
inherit cargoArtifacts;
|
||||||
|
meta = {
|
||||||
|
description = "TUI for managing SOPS-encrypted secrets in NixOS/sops-nix workflows";
|
||||||
|
mainProgram = "sops-tui";
|
||||||
|
platforms = lib.platforms.unix;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
@@ -75,15 +70,27 @@
|
|||||||
inherit system;
|
inherit system;
|
||||||
overlays = [ inputs.rust-overlay.overlays.default ];
|
overlays = [ inputs.rust-overlay.overlays.default ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
packages = {
|
||||||
|
default = sops-tui;
|
||||||
|
inherit sops-tui;
|
||||||
|
};
|
||||||
|
|
||||||
|
checks = {
|
||||||
|
inherit sops-tui;
|
||||||
|
sops-tui-clippy = craneLib.cargoClippy (
|
||||||
|
commonArgs
|
||||||
|
// {
|
||||||
|
inherit cargoArtifacts;
|
||||||
|
cargoClippyExtraArgs = "--all-targets";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
sops-tui-fmt = craneLib.cargoFmt { inherit src; };
|
||||||
|
};
|
||||||
|
|
||||||
devShells.default = craneLib.devShell {
|
devShells.default = craneLib.devShell {
|
||||||
packages = with pkgs; [
|
inputsFrom = [ sops-tui ];
|
||||||
mold
|
packages = with pkgs; [ sops ];
|
||||||
llvmPackages.clang
|
|
||||||
llvmPackages.lld
|
|
||||||
sea-orm-cli
|
|
||||||
watchexec
|
|
||||||
pnpm
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user