Project init

This commit is contained in:
Paul Brinkmeier 2025-02-12 07:07:14 +01:00
commit 0ccf4cb603
3 changed files with 147 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
# nix build artifact
result
# Vim swap files
*.swp

113
flake.lock generated Normal file
View File

@ -0,0 +1,113 @@
{
"nodes": {
"handlebars-rust-src": {
"flake": false,
"locked": {
"lastModified": 1739333321,
"narHash": "sha256-McP84Thhkp+MkMYYDSi21Kl+oTuQbl0WVNOp6/xZZmI=",
"owner": "pbrinkmeier-almato",
"repo": "handlebars-rust",
"rev": "689af230cfae35ed38d1b2506125a680ffa7ca38",
"type": "github"
},
"original": {
"owner": "pbrinkmeier-almato",
"ref": "cargo-lock",
"repo": "handlebars-rust",
"type": "github"
}
},
"naersk": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1736429655,
"narHash": "sha256-BwMekRuVlSB9C0QgwKMICiJ5EVbLGjfe4qyueyNQyGI=",
"owner": "nix-community",
"repo": "naersk",
"rev": "0621e47bd95542b8e1ce2ee2d65d6a1f887a13ce",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "master",
"repo": "naersk",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1739138025,
"narHash": "sha256-M4ilIfGxzbBZuURokv24aqJTbdjPA9K+DtKUzrJaES4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b2243f41e860ac85c0b446eadc6930359b294e79",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1739138025,
"narHash": "sha256-M4ilIfGxzbBZuURokv24aqJTbdjPA9K+DtKUzrJaES4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b2243f41e860ac85c0b446eadc6930359b294e79",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"handlebars-rust-src": "handlebars-rust-src",
"naersk": "naersk",
"nixpkgs": "nixpkgs_2",
"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": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

30
flake.nix Normal file
View File

@ -0,0 +1,30 @@
{
inputs = {
handlebars-rust-src = {
# TODO: Instead of a fork this could be integrated into this repo as a rather simple patch, reducing external depedencies.
url = "github:pbrinkmeier-almato/handlebars-rust/cargo-lock";
flake = false;
};
naersk.url = "github:nix-community/naersk/master";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils, naersk, handlebars-rust-src }:
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
naersk-lib = pkgs.callPackage naersk { };
in
rec {
packages.handlebars-rust = naersk-lib.buildPackage handlebars-rust-src;
devShell = pkgs.mkShell {
nativeBuildInputs = [
packages.handlebars-rust
pkgs.imagemagick
pkgs.gnumake
];
};
}
);
}