Skip to content
Snippets Groups Projects
Commit 9c6dc59f authored by Evy Storozhenko's avatar Evy Storozhenko
Browse files

add nix flake

parent 770f5b99
No related branches found
No related tags found
No related merge requests found
.envrc 0 → 100644
use flake
# rust
target/
# direnv
.direnv/
\ No newline at end of file
{
"nodes": {
"naersk": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1698420672,
"narHash": "sha256-/TdeHMPRjjdJub7p7+w55vyABrsJlt5QkznPYy55vKA=",
"owner": "nix-community",
"repo": "naersk",
"rev": "aeb58d5e8faead8980a807c840232697982d47b9",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "master",
"repo": "naersk",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1701268161,
"narHash": "sha256-hL4jGGwMHHmyx6G9wi6IrYa8RLkoEtzCb4zWITH1B40=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "67be70a859530f6f7c358568eaa6ab0d84b36b01",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"naersk": "naersk",
"nixpkgs": "nixpkgs",
"utils": "utils"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
{
description = "AoC 2023";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
naersk = {
url = "github:nix-community/naersk/master";
inputs.nixpkgs.follows = "nixpkgs";
};
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils, naersk }:
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
buildInputs = with pkgs; [ perl ];
naerskBuildPackage = (conf: (
(pkgs.callPackage naersk { }).buildPackage (
{
src = ./.;
inherit buildInputs;
} // conf
)
));
in
{
packages."01" = naerskBuildPackage { src = ./01/.; };
devShell = with pkgs; mkShell {
buildInputs = buildInputs ++ [ cargo rustc rustfmt rustPackages.clippy ];
RUST_SRC_PATH = rustPlatform.rustLibSrc;
};
});
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment