add nix flake
This commit is contained in:
parent
eb03652d7b
commit
39f66b6f88
2 changed files with 61 additions and 0 deletions
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
|
||||
}
|
34
flake.nix
Normal file
34
flake.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
description = "simple command line mail client";
|
||||
|
||||
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 = "mal";
|
||||
src = ./.;
|
||||
|
||||
nativeBuildInputs = [ ldc ];
|
||||
buildInputs = [ curl ];
|
||||
|
||||
installFlags = [
|
||||
"DESTDIR=$(out)"
|
||||
"PREFIX=/"
|
||||
];
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue