add nix flake
This commit is contained in:
parent
566ec45337
commit
87826cba0d
4 changed files with 69 additions and 1 deletions
|
@ -4,3 +4,7 @@ root = true
|
|||
end_of_line = lf
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
|
||||
[*.nix]
|
||||
indent_style = space
|
||||
indent_size = 2
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -2,4 +2,6 @@
|
|||
*.so
|
||||
*.a
|
||||
esv
|
||||
result
|
||||
|
||||
Makefile
|
||||
|
|
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1707743206,
|
||||
"narHash": "sha256-AehgH64b28yKobC/DAWYZWkJBxL/vP83vkY+ag2Hhy4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2d627a2a704708673e56346fcb13d25344b8eaf3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
35
flake.nix
Normal file
35
flake.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
description = "read the ESV Bible from your terminal";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = github:NixOS/nixpkgs/nixpkgs-unstable;
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
with nixpkgs.lib;
|
||||
let
|
||||
forAllSystems = fn:
|
||||
genAttrs platforms.unix (system:
|
||||
fn (import nixpkgs {
|
||||
inherit system;
|
||||
})
|
||||
);
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (pkgs: {
|
||||
default = pkgs.stdenv.mkDerivation (with pkgs; {
|
||||
name = "esv";
|
||||
src = ./.;
|
||||
|
||||
nativeBuildInputs = [ ldc ];
|
||||
buildInputs = [ curl ];
|
||||
|
||||
dontAddPrefix = true;
|
||||
installFlags = [
|
||||
"DESTDIR=$(out)"
|
||||
"PREFIX=/"
|
||||
];
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue