mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 18:24:05 +02:00
nix: clean src
This commit is contained in:
parent
d82555e58a
commit
6659d673ea
2 changed files with 33 additions and 38 deletions
38
flake.lock
generated
38
flake.lock
generated
|
|
@ -2,14 +2,16 @@
|
|||
"nodes": {
|
||||
"naersk": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1659610603,
|
||||
"narHash": "sha256-LYgASYSPYo7O71WfeUOaEUzYfzuXm8c8eavJcel+pfI=",
|
||||
"lastModified": 1671096816,
|
||||
"narHash": "sha256-ezQCsNgmpUHdZANDCILm3RvtO1xH8uujk/+EqNvzIOg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "naersk",
|
||||
"rev": "c6a45e4277fa58abd524681466d3450f896dc094",
|
||||
"rev": "d998160d6a076cfe8f9741e56aeec7e267e3e114",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -20,45 +22,33 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 0,
|
||||
"narHash": "sha256-+Qmz6wx9qVGpbodRUOFs+ROTXlG/LbasiH+IikF1OQ8=",
|
||||
"path": "/nix/store/7qwl8qpdxbdfw0n8dxbsza2xw54fcxsr-source",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1670918330,
|
||||
"narHash": "sha256-g7h1V1moz/ce38vl/JVvlehvkOkWAE7F2/gAh1BiT+c=",
|
||||
"lastModified": 1685789966,
|
||||
"narHash": "sha256-pyqctu5Cq1jwymO3Os0/RNj5Nm3q5kmRCT24p7gtG70=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "dcc51ef54ebb7c578f68881922a0a5c9b2bde5c1",
|
||||
"rev": "4eaa9e3eb36386de0c6a268ba5da72cafc959619",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "release-22.11",
|
||||
"ref": "release-23.05",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"naersk": "naersk",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"utils": "utils"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
33
flake.nix
33
flake.nix
|
|
@ -1,8 +1,9 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/release-23.05";
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
naersk.url = "github:nix-community/naersk";
|
||||
nixpkgs.url = "nixpkgs/release-22.11";
|
||||
naersk.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
|
|
@ -15,24 +16,28 @@
|
|||
pkgs = (import nixpkgs) {
|
||||
inherit system;
|
||||
};
|
||||
naersk = naersk.lib."${system}";
|
||||
naersk' = pkgs.callPackage naersk {};
|
||||
lib = pkgs.lib;
|
||||
src = lib.sources.sourceByRegex (lib.cleanSource ./.) ["Cargo.*" "(src|tests|benches)(/.*)?"];
|
||||
in rec {
|
||||
# `nix build`
|
||||
packages.tf-demo-parser = naersk.buildPackage {
|
||||
pname = "tf-demo-parser";
|
||||
root = ./.;
|
||||
packages = rec {
|
||||
tf-demo-parser = naersk'.buildPackage {
|
||||
pname = "tf-demo-parser";
|
||||
root = src;
|
||||
};
|
||||
default = tf-demo-parser;
|
||||
};
|
||||
defaultPackage = packages.tf-demo-parser;
|
||||
|
||||
# `nix run`
|
||||
apps.tf-demo-parser = utils.lib.mkApp {
|
||||
drv = packages.tf-demo-parser;
|
||||
apps = rec {
|
||||
tf-demo-parser = utils.lib.mkApp {
|
||||
drv = packages.tf-demo-parser;
|
||||
exePath = "/bin/parse_demo";
|
||||
};
|
||||
default = tf-demo-parser;
|
||||
};
|
||||
defaultApp = apps.tf-demo-parser;
|
||||
|
||||
# `nix develop`
|
||||
devShell = pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [rustc cargo bacon cargo-edit cargo-outdated clippy cargo-audit hyperfine valgrind];
|
||||
devShells.default = pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [rustc cargo bacon cargo-edit cargo-outdated rustfmt clippy cargo-audit hyperfine valgrind];
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue