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": {
|
"nodes": {
|
||||||
"naersk": {
|
"naersk": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659610603,
|
"lastModified": 1671096816,
|
||||||
"narHash": "sha256-LYgASYSPYo7O71WfeUOaEUzYfzuXm8c8eavJcel+pfI=",
|
"narHash": "sha256-ezQCsNgmpUHdZANDCILm3RvtO1xH8uujk/+EqNvzIOg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "naersk",
|
"repo": "naersk",
|
||||||
"rev": "c6a45e4277fa58abd524681466d3450f896dc094",
|
"rev": "d998160d6a076cfe8f9741e56aeec7e267e3e114",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -20,45 +22,33 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 0,
|
"lastModified": 1685789966,
|
||||||
"narHash": "sha256-+Qmz6wx9qVGpbodRUOFs+ROTXlG/LbasiH+IikF1OQ8=",
|
"narHash": "sha256-pyqctu5Cq1jwymO3Os0/RNj5Nm3q5kmRCT24p7gtG70=",
|
||||||
"path": "/nix/store/7qwl8qpdxbdfw0n8dxbsza2xw54fcxsr-source",
|
|
||||||
"type": "path"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"id": "nixpkgs",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1670918330,
|
|
||||||
"narHash": "sha256-g7h1V1moz/ce38vl/JVvlehvkOkWAE7F2/gAh1BiT+c=",
|
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "dcc51ef54ebb7c578f68881922a0a5c9b2bde5c1",
|
"rev": "4eaa9e3eb36386de0c6a268ba5da72cafc959619",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"id": "nixpkgs",
|
||||||
"ref": "release-22.11",
|
"ref": "release-23.05",
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"naersk": "naersk",
|
"naersk": "naersk",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs",
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"utils": {
|
"utils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659877975,
|
"lastModified": 1667395993,
|
||||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
33
flake.nix
33
flake.nix
|
|
@ -1,8 +1,9 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
|
nixpkgs.url = "nixpkgs/release-23.05";
|
||||||
utils.url = "github:numtide/flake-utils";
|
utils.url = "github:numtide/flake-utils";
|
||||||
naersk.url = "github:nix-community/naersk";
|
naersk.url = "github:nix-community/naersk";
|
||||||
nixpkgs.url = "nixpkgs/release-22.11";
|
naersk.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
|
|
@ -15,24 +16,28 @@
|
||||||
pkgs = (import nixpkgs) {
|
pkgs = (import nixpkgs) {
|
||||||
inherit system;
|
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 {
|
in rec {
|
||||||
# `nix build`
|
packages = rec {
|
||||||
packages.tf-demo-parser = naersk.buildPackage {
|
tf-demo-parser = naersk'.buildPackage {
|
||||||
pname = "tf-demo-parser";
|
pname = "tf-demo-parser";
|
||||||
root = ./.;
|
root = src;
|
||||||
|
};
|
||||||
|
default = tf-demo-parser;
|
||||||
};
|
};
|
||||||
defaultPackage = packages.tf-demo-parser;
|
|
||||||
|
|
||||||
# `nix run`
|
apps = rec {
|
||||||
apps.tf-demo-parser = utils.lib.mkApp {
|
tf-demo-parser = utils.lib.mkApp {
|
||||||
drv = packages.tf-demo-parser;
|
drv = packages.tf-demo-parser;
|
||||||
|
exePath = "/bin/parse_demo";
|
||||||
|
};
|
||||||
|
default = tf-demo-parser;
|
||||||
};
|
};
|
||||||
defaultApp = apps.tf-demo-parser;
|
|
||||||
|
|
||||||
# `nix develop`
|
devShells.default = pkgs.mkShell {
|
||||||
devShell = pkgs.mkShell {
|
nativeBuildInputs = with pkgs; [rustc cargo bacon cargo-edit cargo-outdated rustfmt clippy cargo-audit hyperfine valgrind];
|
||||||
nativeBuildInputs = with pkgs; [rustc cargo bacon cargo-edit cargo-outdated clippy cargo-audit hyperfine valgrind];
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue