mirror of
https://github.com/haskell-nix/hnix.git
synced 2024-09-11 06:55:38 +03:00
add flake.nix
This commit is contained in:
parent
f0f16b98b7
commit
44cff913ca
42
flake.lock
Normal file
42
flake.lock
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1570712626,
|
||||
"narHash": "sha256-R3yyxSlyz41cLbB6F54etKNkusPNPGHU0WZkSrfJoKU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nix",
|
||||
"rev": "61e816217bfdfffd39c130c7cd24f07e640098fc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nix",
|
||||
"rev": "61e816217bfdfffd39c130c7cd24f07e640098fc",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1635792138,
|
||||
"narHash": "sha256-D79GqaYrwgyM4wvOPbQeKveAHROnVh97F36iSGZO9uA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b165ce0c4efbb74246714b5c66b6bcdce8cde175",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nix": "nix",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
40
flake.nix
Normal file
40
flake.nix
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
description = "A Haskell re-implementation of the Nix expression language";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs";
|
||||
nix = {
|
||||
url = "nix/61e816217bfdfffd39c130c7cd24f07e640098fc";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
nix,
|
||||
nixpkgs,
|
||||
self,
|
||||
} @ inp: let
|
||||
|
||||
l = builtins //nixpkgs.lib;
|
||||
supportedSystems = ["x86_64-linux"];
|
||||
|
||||
forAllSystems = f: l.genAttrs supportedSystems
|
||||
(system: f system (nixpkgs.legacyPackages.${system}));
|
||||
|
||||
in {
|
||||
|
||||
defaultPackage = forAllSystems
|
||||
(system: pkgs: import ./default.nix {
|
||||
inherit pkgs;
|
||||
withHoogle = true;
|
||||
compiler = "ghc8107";
|
||||
packageRoot = pkgs.runCommand "hnix-src" {} ''
|
||||
cp -r ${./.} $out
|
||||
chmod -R +w $out
|
||||
cp -r ${nix} $out/data/nix
|
||||
'';
|
||||
});
|
||||
|
||||
devShell = forAllSystems (system: pkgs: self.defaultPackage.${system}.env);
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user