mirror of
https://codeberg.org/iff/pay-respects.git
synced 2025-10-06 00:22:43 +02:00
feat: flake
This commit is contained in:
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733759999,
|
||||||
|
"narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
69
flake.nix
Normal file
69
flake.nix
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs }:
|
||||||
|
let
|
||||||
|
inherit (nixpkgs.lib)
|
||||||
|
genAttrs
|
||||||
|
importTOML
|
||||||
|
licenses
|
||||||
|
maintainers
|
||||||
|
sourceByRegex
|
||||||
|
;
|
||||||
|
|
||||||
|
eachSystem = f: genAttrs
|
||||||
|
[
|
||||||
|
"aarch64-darwin"
|
||||||
|
"aarch64-linux"
|
||||||
|
"x86_64-darwin"
|
||||||
|
"x86_64-linux"
|
||||||
|
]
|
||||||
|
(system: f nixpkgs.legacyPackages.${system});
|
||||||
|
in
|
||||||
|
{
|
||||||
|
formatter = eachSystem (pkgs: pkgs.nixpkgs-fmt);
|
||||||
|
|
||||||
|
packages = eachSystem (pkgs:
|
||||||
|
let
|
||||||
|
src = sourceByRegex self [
|
||||||
|
"(core)(/.*)?"
|
||||||
|
"(module-runtime-rules)(/.*)?"
|
||||||
|
"(module-request-ai)(/.*)?"
|
||||||
|
"(rules)(/.*)?"
|
||||||
|
''Cargo\.(toml|lock)''
|
||||||
|
];
|
||||||
|
|
||||||
|
inherit (pkgs)
|
||||||
|
rustPlatform
|
||||||
|
openssl
|
||||||
|
pkg-config
|
||||||
|
;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
default =
|
||||||
|
rustPlatform.buildRustPackage {
|
||||||
|
pname = "pay-respects";
|
||||||
|
inherit ((importTOML (src + "/core/Cargo.toml")).package) version;
|
||||||
|
|
||||||
|
inherit src;
|
||||||
|
|
||||||
|
cargoLock = {
|
||||||
|
lockFile = src + "/Cargo.lock";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ pkg-config ];
|
||||||
|
buildInputs = [ openssl ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Command suggestions, command-not-found and thefuck replacement written in Rust";
|
||||||
|
license = licenses.agpl3Plus;
|
||||||
|
homepage = "https://github.com/iffse/pay-respects";
|
||||||
|
maintainers = with maintainers; [ iff ];
|
||||||
|
mainProgram = "pay-respects";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
Reference in New Issue
Block a user