flake stuff
This commit is contained in:
parent
d8e8a95ef4
commit
ea0ae8f127
2 changed files with 35 additions and 44 deletions
43
flake.lock
43
flake.lock
|
@ -127,21 +127,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"locked": {
|
||||
"lastModified": 1638122382,
|
||||
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"frex": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -264,7 +249,9 @@
|
|||
"dot-parse": "dot-parse",
|
||||
"effect": "effect",
|
||||
"elab-util": "elab-util",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"flake-utils": [
|
||||
"flake-utils"
|
||||
],
|
||||
"frex": "frex",
|
||||
"fvect": "fvect",
|
||||
"hashable": "hashable",
|
||||
|
@ -278,7 +265,9 @@
|
|||
"json": "json",
|
||||
"katla": "katla",
|
||||
"lsp": "lsp",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"odf": "odf",
|
||||
"pretty-show": "pretty-show",
|
||||
"python": "python",
|
||||
|
@ -401,18 +390,17 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1639213685,
|
||||
"narHash": "sha256-Evuobw7o9uVjAZuwz06Al0fOWZ5JMKOktgXR0XgWBtg=",
|
||||
"owner": "nixos",
|
||||
"lastModified": 1638239011,
|
||||
"narHash": "sha256-AjhmbT4UBlJWqxY0ea8a6GU2C2HdKUREkG43oRr3TZg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "453bcb8380fd1777348245b3c44ce2a2b93b2e2d",
|
||||
"rev": "a7ecde854aee5c4c7cd6177f54a99d2c1ff28a31",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-21.11-darwin",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
"id": "nixpkgs",
|
||||
"ref": "21.11",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"odf": {
|
||||
|
@ -499,10 +487,7 @@
|
|||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"idris2-pkgs": "idris2-pkgs",
|
||||
"nixpkgs": [
|
||||
"idris2-pkgs",
|
||||
"nixpkgs"
|
||||
]
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"snocvect": {
|
||||
|
|
36
flake.nix
36
flake.nix
|
@ -1,36 +1,42 @@
|
|||
{ description = "basic test framework for idris 2";
|
||||
|
||||
inputs = {
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
idris2-pkgs.url = "github:claymager/idris2-pkgs";
|
||||
nixpkgs.follows = "idris2-pkgs/nixpkgs";
|
||||
nixpkgs.url = "nixpkgs/21.11";
|
||||
|
||||
flake-utils = {
|
||||
url = "github:numtide/flake-utils";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
idris2-pkgs = {
|
||||
url = "github:claymager/idris2-pkgs";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.flake-utils.follows = "flake-utils";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, idris2-pkgs, flake-utils }:
|
||||
let systems = with flake-utils.lib.system;
|
||||
[ x86_64-darwin x86_64-linux i686-linux ];
|
||||
in
|
||||
flake-utils.lib.eachSystem systems (system:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ idris2-pkgs.overlay ];
|
||||
};
|
||||
inherit (pkgs.idris2-pkgs._builders) idrisPackage devEnv;
|
||||
builders = pkgs.idris2-pkgs._builders;
|
||||
|
||||
packages = rec {
|
||||
tap = idrisPackage ./. { };
|
||||
tap-example = idrisPackage ./example { extraPkgs = packages; };
|
||||
packages = let ipkg = builders.idrisPackage; in rec {
|
||||
tap = ipkg ./. { };
|
||||
tap-example = ipkg ./example { extraPkgs = packages; };
|
||||
};
|
||||
|
||||
devShells =
|
||||
let mkDevShell = _: pkg:
|
||||
pkgs.mkShell { buildInputs = [ (devEnv pkg) ]; };
|
||||
shells = packages // (with packages; { example = tap-example; });
|
||||
in builtins.mapAttrs mkDevShell shells;
|
||||
pkgs.mkShell { buildInputs = [ (builders.devEnv pkg) ]; };
|
||||
in builtins.mapAttrs mkDevShell packages;
|
||||
in {
|
||||
inherit packages devShells;
|
||||
defaultPackage = packages.tap;
|
||||
devShell = devShells.tap;
|
||||
devShell = devShells.tap;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue