From 02d52d8f931c7548d5f4c012b4ee9781d79424d3 Mon Sep 17 00:00:00 2001 From: Daniel Wilson-Thomas Date: Sat, 12 Aug 2017 21:59:47 -0400 Subject: [PATCH 1/2] Literate: init --- .../literate-programming/Literate/default.nix | 17 +++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 pkgs/development/tools/literate-programming/Literate/default.nix diff --git a/pkgs/development/tools/literate-programming/Literate/default.nix b/pkgs/development/tools/literate-programming/Literate/default.nix new file mode 100644 index 000000000000..28ef14a80cc3 --- /dev/null +++ b/pkgs/development/tools/literate-programming/Literate/default.nix @@ -0,0 +1,17 @@ +{ stdenv, fetchgit, dmd, dub }: + +stdenv.mkDerivation { + name = "Literate"; + src = fetchgit { + url = "https://github.com/zyedidia/Literate.git"; + rev = "23928d64bb19b5101dbcc794da6119beaf59f679"; + sha256 = "094lramvacarzj8443ns18zyv7dxnivwi7kdk5xi5r2z4gx338iq"; + }; + buildInputs = [dmd dub]; + preInstall = '' + # Gross, but the Makefile doesn't provide an install target + mkdir $out + cp -R bin $out/bin + ''; + phases = "unpackPhase patchPhase buildPhase checkPhase preInstall fixupPhase"; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f6ae62db18db..87fc89e4eae0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7019,6 +7019,8 @@ with pkgs; kube-aws = callPackage ../development/tools/kube-aws { }; + Literate = callPackage ../development/tools/literate-programming/Literate {}; + lcov = callPackage ../development/tools/analysis/lcov { }; leiningen = callPackage ../development/tools/build-managers/leiningen { }; From 916f1a0b8dcf94e2836c33ddd256532a7248b56e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 27 Aug 2017 07:25:05 +0100 Subject: [PATCH 2/2] Literate: adapt to nixpkgs standards --- .../literate-programming/Literate/default.nix | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/pkgs/development/tools/literate-programming/Literate/default.nix b/pkgs/development/tools/literate-programming/Literate/default.nix index 28ef14a80cc3..4bc3e77dbaa7 100644 --- a/pkgs/development/tools/literate-programming/Literate/default.nix +++ b/pkgs/development/tools/literate-programming/Literate/default.nix @@ -1,17 +1,22 @@ { stdenv, fetchgit, dmd, dub }: stdenv.mkDerivation { - name = "Literate"; + name = "Literate-2017-05-28"; + src = fetchgit { url = "https://github.com/zyedidia/Literate.git"; rev = "23928d64bb19b5101dbcc794da6119beaf59f679"; sha256 = "094lramvacarzj8443ns18zyv7dxnivwi7kdk5xi5r2z4gx338iq"; }; - buildInputs = [dmd dub]; - preInstall = '' - # Gross, but the Makefile doesn't provide an install target - mkdir $out - cp -R bin $out/bin - ''; - phases = "unpackPhase patchPhase buildPhase checkPhase preInstall fixupPhase"; + + buildInputs = [ dmd dub ]; + + installPhase = "install -D bin/lit $out/bin/lit"; + + meta = with stdenv.lib; { + description = "A literate programming tool for any language"; + homepage = http://literate.zbyedidia.webfactional.com/; + license = licenses.mit; + platforms = platforms.unix; + }; }