From 9945b5767908c99ed8d205637bb20e0e17f30e2a Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Wed, 24 Nov 2021 22:14:21 -0500 Subject: [PATCH] working nix flake --- flake.lock | 41 +++++++++++++++++++++++++++++++++++++++++ flake.nix | 23 +++++++++++++++++++++++ kitchen.nix | 16 ++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 kitchen.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..007a060 --- /dev/null +++ b/flake.lock @@ -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 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..105d35f --- /dev/null +++ b/flake.nix @@ -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; + }); + } + ); + +} \ No newline at end of file diff --git a/kitchen.nix b/kitchen.nix new file mode 100644 index 0000000..9713c1e --- /dev/null +++ b/kitchen.nix @@ -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="; + }