working nix flake
This commit is contained in:
commit
9945b57679
41
flake.lock
generated
Normal file
41
flake.lock
generated
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1637014545,
|
||||||
|
"narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "bba5dcc8e0b20ab664967ad83d24d64cb64ec4f4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1637761569,
|
||||||
|
"narHash": "sha256-mz9IK4Yb4haeXC1NoSsAYkJP5a+1IdHKvSVYzRAFhTE=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "1269aeb705a2fc1fb4ca68c21990c52fee3fd395",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
23
flake.nix
Normal file
23
flake.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
description = "My recipe collection";
|
||||||
|
inputs.nixpkgs = {
|
||||||
|
type = "indirect";
|
||||||
|
id = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
|
||||||
|
outputs = {self, nixpkgs, flake-utils}:
|
||||||
|
let
|
||||||
|
kitchenGen = import ./kitchen.nix;
|
||||||
|
in
|
||||||
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let pkgs = import nixpkgs { inherit system; }; in
|
||||||
|
{
|
||||||
|
defaultPackage = (kitchenGen {
|
||||||
|
nixpkgs = pkgs;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
16
kitchen.nix
Normal file
16
kitchen.nix
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{nixpkgs}:
|
||||||
|
with nixpkgs;
|
||||||
|
let
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "zaphar";
|
||||||
|
repo = "kitchen";
|
||||||
|
rev = "78921d973cf1a473e27cf0dcfea8846d062e3611";
|
||||||
|
sha256 = "sha256-pi50mLPYHZ/MfiQAFhO4jlYkZxQiw0WzVLkINr7ZR+E=";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
rustPlatform.buildRustPackage {
|
||||||
|
pname = "kitchen";
|
||||||
|
version = "0.0.1";
|
||||||
|
inherit src;
|
||||||
|
cargoSha256 = "sha256-DmUWZbZL8A5ht9ujx70qDvT6UC1CKiY6LtwWmKMvVhs=";
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user