Switch to a fixed dhall-nix
This commit is contained in:
parent
35de362707
commit
b110661903
5 changed files with 107 additions and 5 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
use flake
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
.direnv/
|
|
@ -1,7 +1,9 @@
|
||||||
{ pkgs ? import <nixpkgs> {} }: code:
|
{pkgs ? import <nixpkgs> {}}: code: let
|
||||||
let
|
|
||||||
codeString = builtins.toString code;
|
codeString = builtins.toString code;
|
||||||
file = if builtins.isPath code then code else builtins.toFile "dhall-expr" codeString;
|
file =
|
||||||
|
if builtins.isPath code
|
||||||
|
then code
|
||||||
|
else builtins.toFile "dhall-expr" codeString;
|
||||||
drv = pkgs.stdenvNoCC.mkDerivation {
|
drv = pkgs.stdenvNoCC.mkDerivation {
|
||||||
name = "dhall-expr-as-nix";
|
name = "dhall-expr-as-nix";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
@ -10,6 +12,7 @@ let
|
||||||
dhall-to-nix < ${file} > $out
|
dhall-to-nix < ${file} > $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgs.dhall-nix ];
|
nativeBuildInputs = [pkgs.dhall-nix];
|
||||||
};
|
};
|
||||||
in import "${drv}" (import ./runtime.nix)
|
in
|
||||||
|
import "${drv}" (import ./runtime.nix)
|
||||||
|
|
62
flake.lock
Normal file
62
flake.lock
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"dhall-haskell": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1662555889,
|
||||||
|
"narHash": "sha256-+MUDk6Wa3KaVaVBH0u4esfV9h9fYSuGuEaNXSmep1vI=",
|
||||||
|
"ref": "nix-hotfix",
|
||||||
|
"rev": "452fd3adabca14e4ec9ff80eee9b6f84489902e5",
|
||||||
|
"revCount": 1918,
|
||||||
|
"submodules": true,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/darkkirb/dhall-haskell"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"ref": "nix-hotfix",
|
||||||
|
"submodules": true,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/darkkirb/dhall-haskell"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1659877975,
|
||||||
|
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1662556621,
|
||||||
|
"narHash": "sha256-9K/E3k261ksOje0SsSug2AiykuEwu8BaLgHFhTHr3+w=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "c66b76594310df647f99a653e98e8e59e842d0c6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"dhall-haskell": "dhall-haskell",
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
35
flake.nix
Normal file
35
flake.nix
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
description = "A very basic flake";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
dhall-haskell = {
|
||||||
|
url = "https://github.com/darkkirb/dhall-haskell";
|
||||||
|
flake = false;
|
||||||
|
type = "git";
|
||||||
|
submodules = true;
|
||||||
|
ref = "nix-hotfix";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
flake-utils,
|
||||||
|
dhall-haskell,
|
||||||
|
}:
|
||||||
|
flake-utils.lib.eachDefaultSystem (system: let
|
||||||
|
pkgs = import nixpkgs {inherit system; overlays = [ self.overlays.${system}.default ];};
|
||||||
|
in {
|
||||||
|
formatter = pkgs.alejandra;
|
||||||
|
packages = rec {
|
||||||
|
inherit (import "${dhall-haskell}/nix/shared.nix" { inherit system; }) dhall dhall-nix;
|
||||||
|
};
|
||||||
|
overlays.default = (_: _: self.packages.${system});
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
nativeBuildInputs = [ self.packages.${system}.dhall self.packages.${system}.dhall-nix];
|
||||||
|
};
|
||||||
|
lib.dhallToNix = import ./dhallToNix.nix {inherit pkgs;};
|
||||||
|
});
|
||||||
|
}
|
Loading…
Reference in a new issue