add dhall packages

This commit is contained in:
Cadey Ratio 2020-02-13 21:50:49 +00:00
parent 12b2ae177d
commit 218fa97d62
3 changed files with 46 additions and 1 deletions

View File

@ -5,11 +5,23 @@ let
callPackage = pkgs.lib.callPackageWith (pkgs // self); callPackage = pkgs.lib.callPackageWith (pkgs // self);
x = callPackage ./pkgs/x { }; x = callPackage ./pkgs/x { };
quickserv = callPackage sources.quickserv { }; quickserv = callPackage sources.quickserv { };
dhall = callPackage sources.easy-dhall-nix { };
self = { self = {
# nix tools
dhallToNix = import ./dhallToNix.nix;
# other
MoonPlus = callPackage ./pkgs/moonplus { }; MoonPlus = callPackage ./pkgs/moonplus { };
minica = callPackage ./pkgs/minica { }; minica = callPackage ./pkgs/minica { };
# dhall
dhall = dhall.dhall-simple;
dhall-bash = dhall.dhall-bash-simple;
dhall-nix = dhall.dhall-nix-simple;
dhall-json = dhall.dhall-json-simple;
dhall-yaml = dhall.dhall-yaml-simple;
# lojban # lojban
johaus = callPackage ./pkgs/johaus { }; johaus = callPackage ./pkgs/johaus { };
jvozba = callPackage ./pkgs/jvozba { }; jvozba = callPackage ./pkgs/jvozba { };
@ -23,6 +35,6 @@ let
mainsanow = x.mainsanow; mainsanow = x.mainsanow;
prefix = x.prefix; prefix = x.prefix;
inherit x quickserv; inherit quickserv x;
}; };
in self in self

21
dhallToNix.nix Normal file
View File

@ -0,0 +1,21 @@
let
sources = import ./nix/sources.nix;
pkgs = import sources.nixpkgs { };
withPkg = pkgs.lib.callPackageWith pkgs;
dhall = withPkg sources.easy-dhall-nix { };
in code:
let
file = builtins.toFile "dhall-expr" code;
drv = pkgs.stdenv.mkDerivation {
name = "dhall-expr-as-nix";
buildCommand = ''
dhall-to-nix <<< "${file}" > $out
'';
buildInputs = [ dhall.dhall-nix-simple ];
};
in
import "${drv}"

View File

@ -11,6 +11,18 @@
"url": "https://github.com/pigpigyyy/MoonPlus/archive/d0583829535462a070e7ae90c6ea13f14244d060.tar.gz", "url": "https://github.com/pigpigyyy/MoonPlus/archive/d0583829535462a070e7ae90c6ea13f14244d060.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}, },
"easy-dhall-nix": {
"branch": "master",
"description": "Derivations for easily downloading Dhall binaries and putting them to use.",
"homepage": "",
"owner": "justinwoo",
"repo": "easy-dhall-nix",
"rev": "735ad924fd829c9bbee0a167e0b2bbbf91e2cad5",
"sha256": "1r3sqs1cz0mcfwfvaq1d21vnppg5sqzqdl6w9krsw5ad5czkk190",
"type": "tarball",
"url": "https://github.com/justinwoo/easy-dhall-nix/archive/735ad924fd829c9bbee0a167e0b2bbbf91e2cad5.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"niv": { "niv": {
"branch": "master", "branch": "master",
"description": "Easy dependency management for Nix projects", "description": "Easy dependency management for Nix projects",