First pass at a working nix flake

This commit is contained in:
Jeremy Wall 2021-12-31 13:30:27 -05:00
parent b46e5746b9
commit 131acf12da
2 changed files with 33 additions and 0 deletions

25
flake.nix Normal file
View File

@ -0,0 +1,25 @@
{
description = "kitchen";
inputs.nixpkgs = {
type = "indirect";
id = "nixpkgs";
};
inputs.gitignore = = { url = "github:hercules-ci/gitignore.nix"; flake = false; };
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = {self, nixpkgs, flake-utils}:
let
kitchenGen = import ./kitchen.nix;
gitignoreSrc = pkgs.callPackage inputs.gitignore { };
in
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; }; in
{
defaultPackage = (kitchenGen {
nixpkgs = pkgs;
inherit gitignoreSrc;
});
}
);
}

8
kitchen.nix Normal file
View File

@ -0,0 +1,8 @@
{nixpkgs, gitignoreSrc}:
with nixpkgs;
rustPlatform.buildRustPackage {
pname = "kitchen";
version = "0.0.2";
src = gitignoreSrc.gitignoreSource ./.;
cargoSha256 = "sha256-DmUWZbZL8A5ht9ujx70qDvT6UC1CKiY6LtwWmKMvVhs=";
}