diff options
author | Silvan Mosberger <infinisil@icloud.com> | 2019-08-26 18:23:55 +0200 |
---|---|---|
committer | Silvan Mosberger <infinisil@icloud.com> | 2019-08-26 18:23:55 +0200 |
commit | 1ffdf01777360f548cc7c10ef5b168cbe78fd183 (patch) | |
tree | be0d58c6630a28db146c139c72d6f1b82ee14851 /pkgs/development/compilers | |
parent | a3aec20f266c57d989524f02b1243b4ad24020a2 (diff) |
crystal2nix: Put it into pkgs
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/crystal/crystal2nix.cr (renamed from pkgs/development/compilers/mint/crystal2nix.cr) | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/crystal/crystal2nix.nix | 16 | ||||
-rw-r--r-- | pkgs/development/compilers/crystal/default.nix | 2 |
3 files changed, 19 insertions, 1 deletions
diff --git a/pkgs/development/compilers/mint/crystal2nix.cr b/pkgs/development/compilers/crystal/crystal2nix.cr index f608102a37b4d..0610de5cfa4d7 100644 --- a/pkgs/development/compilers/mint/crystal2nix.cr +++ b/pkgs/development/compilers/crystal/crystal2nix.cr @@ -26,7 +26,7 @@ File.open "shards.nix", "w+" do |file| sha256 = "" args = ["--url", url, "--rev", rev] - Process.run("nix-prefetch-git", args: args) do |x| + Process.run("@nixPrefetchGit@", args: args) do |x| x.error.each_line { |e| puts e } sha256 = PrefetchJSON.from_json(x.output).sha256 end diff --git a/pkgs/development/compilers/crystal/crystal2nix.nix b/pkgs/development/compilers/crystal/crystal2nix.nix new file mode 100644 index 0000000000000..ac69b9b3d965b --- /dev/null +++ b/pkgs/development/compilers/crystal/crystal2nix.nix @@ -0,0 +1,16 @@ +{ lib, crystal, nix-prefetch-git }: +crystal.buildCrystalPackage { + pname = "crystal2nix"; + version = "unstable-2018-07-31"; + + nixPrefetchGit = "${lib.getBin nix-prefetch-git}/bin/nix-prefetch-git"; + unpackPhase = "substituteAll ${./crystal2nix.cr} crystal2nix.cr"; + + crystalBinaries.crystal2nix.src = "crystal2nix.cr"; + + meta = with lib; { + description = "Utility to convert Crystal's shard.lock files to a Nix file"; + license = licenses.mit; + maintainers = [ maintainers.manveru ]; + }; +} diff --git a/pkgs/development/compilers/crystal/default.nix b/pkgs/development/compilers/crystal/default.nix index 0cb0a3733ed02..c7a74880e4484 100644 --- a/pkgs/development/compilers/crystal/default.nix +++ b/pkgs/development/compilers/crystal/default.nix @@ -212,4 +212,6 @@ in rec { }; crystal = crystal_0_30; + + crystal2nix = callPackage ./crystal2nix.nix {}; } |