diff --git a/pkgs/development/idris-modules/bi.nix b/pkgs/development/idris-modules/bi.nix index d16d9b2245d6..844ce98cd4c3 100644 --- a/pkgs/development/idris-modules/bi.nix +++ b/pkgs/development/idris-modules/bi.nix @@ -8,6 +8,7 @@ build-idris-package { name = "bi"; version = "2018-06-25"; + ipkgName = "Bi"; idrisDeps = [ contrib pruviloj ]; src = fetchFromGitHub { diff --git a/pkgs/development/idris-modules/bifunctors.nix b/pkgs/development/idris-modules/bifunctors.nix index 53b4fb0a004f..3a915cd67f41 100644 --- a/pkgs/development/idris-modules/bifunctors.nix +++ b/pkgs/development/idris-modules/bifunctors.nix @@ -13,10 +13,6 @@ build-idris-package { sha256 = "0cfp58lhm2g0g1vrpb0mh71qb44n2yvg5sil9ndyf2sqd5ria6yq"; }; - postUnpack = '' - rm source/test.ipkg - ''; - meta = { description = "A small bifunctor library for idris"; homepage = https://github.com/japesinator/Idris-Bifunctors; diff --git a/pkgs/development/idris-modules/build-idris-package.nix b/pkgs/development/idris-modules/build-idris-package.nix index 3ed1404fef7c..5e1288685a7e 100644 --- a/pkgs/development/idris-modules/build-idris-package.nix +++ b/pkgs/development/idris-modules/build-idris-package.nix @@ -5,6 +5,7 @@ , noBase ? false , name , version + , ipkgName ? name , extraBuildInputs ? [] , ... }@attrs: @@ -13,7 +14,10 @@ let ++ lib.optional (!noPrelude) idrisPackages.prelude ++ lib.optional (!noBase) idrisPackages.base; idris-with-packages = idrisPackages.with-packages allIdrisDeps; - newAttrs = builtins.removeAttrs attrs [ "idrisDeps" "extraBuildInputs" "name" "version" ] // { + newAttrs = builtins.removeAttrs attrs [ + "idrisDeps" "noPrelude" "noBase" + "name" "version" "ipkgName" "extraBuildInputs" + ] // { meta = attrs.meta // { platforms = attrs.meta.platforms or idrisPackages.idris.meta.platforms; }; @@ -29,22 +33,29 @@ stdenv.mkDerivation ({ # opts = -i ../../path/to/package # rather than the declarative pkgs attribute so we have to rewrite the path. postPatch = '' - sed -i *.ipkg -e "/^opts/ s|-i \\.\\./|-i ${idris-with-packages}/libs/|g" + runHook prePatch + sed -i ${ipkgName}.ipkg -e "/^opts/ s|-i \\.\\./|-i ${idris-with-packages}/libs/|g" ''; buildPhase = '' - idris --build *.ipkg + runHook preBuild + idris --build ${ipkgName}.ipkg + runHook postBuild ''; checkPhase = '' - if grep -q test *.ipkg; then - idris --testpkg *.ipkg + runHook preCheck + if grep -q tests ${ipkgName}.ipkg; then + idris --testpkg ${ipkgName}.ipkg fi + runHook postCheck ''; installPhase = '' - idris --install *.ipkg --ibcsubdir $out/libs - IDRIS_DOC_PATH=$out/doc idris --installdoc *.ipkg || true + runHook preInstall + idris --install ${ipkgName}.ipkg --ibcsubdir $out/libs + IDRIS_DOC_PATH=$out/doc idris --installdoc ${ipkgName}.ipkg || true + runHook postInstall ''; } // newAttrs) diff --git a/pkgs/development/idris-modules/canvas.nix b/pkgs/development/idris-modules/canvas.nix index 72e5e3f5be7e..0f6e258ee202 100644 --- a/pkgs/development/idris-modules/canvas.nix +++ b/pkgs/development/idris-modules/canvas.nix @@ -6,6 +6,8 @@ build-idris-package { name = "canvas"; version = "2017-11-09"; + ipkgName = "idriscanvas"; + src = fetchFromGitHub { owner = "JinWuZhao"; repo = "idriscanvas"; diff --git a/pkgs/development/idris-modules/coda.nix b/pkgs/development/idris-modules/coda.nix index 7dbd12110888..c5e33f4594f2 100644 --- a/pkgs/development/idris-modules/coda.nix +++ b/pkgs/development/idris-modules/coda.nix @@ -6,6 +6,8 @@ build-idris-package { name = "coda"; version = "2018-01-25"; + ipkgName = "Coda"; + src = fetchFromGitHub { owner = "ostera"; repo = "idris-coda"; diff --git a/pkgs/development/idris-modules/containers.nix b/pkgs/development/idris-modules/containers.nix index c12ea54f5f9f..2fe783da4486 100644 --- a/pkgs/development/idris-modules/containers.nix +++ b/pkgs/development/idris-modules/containers.nix @@ -17,10 +17,6 @@ build-idris-package { sha256 = "0vyjadd9sb8qcbzvzhnqwc8wa7ma770c10xhn96jsqsnzr81k52d"; }; - postUnpack = '' - rm source/containers-travis.ipkg - ''; - meta = { description = "Various data structures for use in the Idris Language."; homepage = https://github.com/jfdm/idris-containers; diff --git a/pkgs/development/idris-modules/electron.nix b/pkgs/development/idris-modules/electron.nix index 3989b8f41135..8b968c9732ab 100644 --- a/pkgs/development/idris-modules/electron.nix +++ b/pkgs/development/idris-modules/electron.nix @@ -18,11 +18,6 @@ build-idris-package { sha256 = "1rpa7yjvfpzl06h0qbk54jd2n52nmgpf7nq5aamcinqh7h5gbiwn"; }; - postUnpack = '' - rm source/example_main.ipkg - rm source/example_view.ipkg - ''; - meta = { description = "Electron bindings for Idris"; homepage = https://github.com/jheiling/idris-electron; diff --git a/pkgs/development/idris-modules/free.nix b/pkgs/development/idris-modules/free.nix index 8e979ea796ec..06b8ec5e82d2 100644 --- a/pkgs/development/idris-modules/free.nix +++ b/pkgs/development/idris-modules/free.nix @@ -6,6 +6,8 @@ build-idris-package { name = "free"; version = "2017-07-03"; + ipkgName = "idris-free"; + src = fetchFromGitHub { owner = "idris-hackers"; repo = "idris-free"; diff --git a/pkgs/development/idris-modules/hamt.nix b/pkgs/development/idris-modules/hamt.nix index 17706d1b0969..79df925323ed 100644 --- a/pkgs/development/idris-modules/hamt.nix +++ b/pkgs/development/idris-modules/hamt.nix @@ -5,7 +5,7 @@ , lib }: build-idris-package { - name = "idris-hamt"; + name = "hamt"; version = "2016-11-15"; idrisDeps = [ contrib effects ]; diff --git a/pkgs/development/idris-modules/hrtime.nix b/pkgs/development/idris-modules/hrtime.nix index 09fabb6715db..9e9736d25661 100644 --- a/pkgs/development/idris-modules/hrtime.nix +++ b/pkgs/development/idris-modules/hrtime.nix @@ -7,6 +7,7 @@ build-idris-package { name = "hrtime"; version = "2017-04-16"; + ipkgName = "hrTime"; idrisDeps = [ idrisscript ]; src = fetchFromGitHub { diff --git a/pkgs/development/idris-modules/idrishighlighter.nix b/pkgs/development/idris-modules/idrishighlighter.nix index d8b469ca7689..5629221d601b 100644 --- a/pkgs/development/idris-modules/idrishighlighter.nix +++ b/pkgs/development/idris-modules/idrishighlighter.nix @@ -8,6 +8,7 @@ build-idris-package { name = "idrishighlighter"; version = "2018-02-22"; + ipkgName = "idris-code-highlighter"; idrisDeps = [ effects lightyear ]; src = fetchFromGitHub { diff --git a/pkgs/development/idris-modules/jheiling-js.nix b/pkgs/development/idris-modules/jheiling-js.nix index 2281e4821f7a..dae310cda053 100644 --- a/pkgs/development/idris-modules/jheiling-js.nix +++ b/pkgs/development/idris-modules/jheiling-js.nix @@ -8,6 +8,7 @@ build-idris-package { name = "jheiling-js"; version = "2016-03-09"; + ipkgName = "js"; idrisDeps = [ contrib jheiling-extras ]; src = fetchFromGitHub { diff --git a/pkgs/development/idris-modules/mhd.nix b/pkgs/development/idris-modules/mhd.nix index 9f4af7cc3b85..197cb1552cbd 100644 --- a/pkgs/development/idris-modules/mhd.nix +++ b/pkgs/development/idris-modules/mhd.nix @@ -9,6 +9,7 @@ build-idris-package { name = "mhd"; version = "2016-04-22"; + ipkgName = "MHD"; idrisDeps = [ contrib effects ]; extraBuildInputs = [ libmicrohttpd ]; diff --git a/pkgs/development/idris-modules/patricia.nix b/pkgs/development/idris-modules/patricia.nix index 9ba8c6bb2d4d..5ce9ad7e915d 100644 --- a/pkgs/development/idris-modules/patricia.nix +++ b/pkgs/development/idris-modules/patricia.nix @@ -16,10 +16,6 @@ build-idris-package { sha256 = "093q3qjmr93wv8pqwk0zfm3hzf14c235k9c9ip53rhg6yzcm0yqz"; }; - postUnpack = '' - rm source/patricia-nix.ipkg - ''; - meta = { description = "Immutable map from integer keys to values based on patricia tree. Basically persistent array."; homepage = https://github.com/ChShersh/idris-patricia; diff --git a/pkgs/development/idris-modules/permutations.nix b/pkgs/development/idris-modules/permutations.nix index 8bcb67fa759a..21b81f4a95c5 100644 --- a/pkgs/development/idris-modules/permutations.nix +++ b/pkgs/development/idris-modules/permutations.nix @@ -13,10 +13,6 @@ build-idris-package { sha256 = "1dirzqy40fczbw7gp2jr51lzqsnq5vcx9z5l6194lcrq2vxgzv1s"; }; - postUnpack = '' - rm source/test.ipkg - ''; - meta = { description = "Type-safe way of working with permutations in Idris"; homepage = https://github.com/vmchale/permutations; diff --git a/pkgs/development/idris-modules/recursion_schemes.nix b/pkgs/development/idris-modules/recursion_schemes.nix index 78f3674aeabd..dab6913ee8bc 100644 --- a/pkgs/development/idris-modules/recursion_schemes.nix +++ b/pkgs/development/idris-modules/recursion_schemes.nix @@ -20,10 +20,6 @@ build-idris-package { sha256 = "0rbx0yqa0fb7h7qfsvqvirc5q85z51rcwbivn6351jgn3a0inmhf"; }; - postUnpack = '' - rm source/test.ipkg - ''; - meta = { description = "Recursion schemes for Idris"; homepage = https://github.com/vmchale/recursion_schemes; diff --git a/pkgs/development/idris-modules/refined.nix b/pkgs/development/idris-modules/refined.nix index 00252b6a7cd6..433fdf647697 100644 --- a/pkgs/development/idris-modules/refined.nix +++ b/pkgs/development/idris-modules/refined.nix @@ -6,6 +6,8 @@ build-idris-package { name = "refined"; version = "2017-12-28"; + ipkgName = "idris-refined"; + src = fetchFromGitHub { owner = "janschultecom"; repo = "idris-refined"; @@ -13,10 +15,6 @@ build-idris-package { sha256 = "1am7kfc51p2zlml954v8cl9xvx0g0f1caq7ni3z36xvsd7fh47yh"; }; - postUnpack = '' - rm source/idris-refined-test.ipkg - ''; - meta = { description = "Port of Scala/Haskell Refined library to Idris"; homepage = https://github.com/janschultecom/idris-refined; diff --git a/pkgs/development/idris-modules/snippets.nix b/pkgs/development/idris-modules/snippets.nix index c8d993ccb8a2..6d752fed0f98 100644 --- a/pkgs/development/idris-modules/snippets.nix +++ b/pkgs/development/idris-modules/snippets.nix @@ -7,6 +7,7 @@ build-idris-package { name = "snippets"; version = "2018-03-17"; + ipkgName = "idris-snippets"; idrisDeps = [ contrib ]; src = fetchFromGitHub { diff --git a/pkgs/development/idris-modules/tap.nix b/pkgs/development/idris-modules/tap.nix index 7f80a1ce3c50..98f4b4ea4d63 100644 --- a/pkgs/development/idris-modules/tap.nix +++ b/pkgs/development/idris-modules/tap.nix @@ -7,6 +7,7 @@ build-idris-package { name = "tap"; version = "2017-04-08"; + ipkgName = "TAP"; idrisDeps = [ contrib ]; src = fetchFromGitHub { @@ -16,10 +17,6 @@ build-idris-package { sha256 = "0fhlmmivq9xv89r7plrnhmvay1j7bapz3wh7y8lygwvcrllh9zxs"; }; - postUnpack = '' - rm source/Draft.ipkg - ''; - meta = { description = "A simple TAP producer and consumer/reporter for Idris"; homepage = https://github.com/ostera/tap-idris; diff --git a/pkgs/development/idris-modules/tparsec.nix b/pkgs/development/idris-modules/tparsec.nix index bd895a33bae3..00d4adba5dc8 100644 --- a/pkgs/development/idris-modules/tparsec.nix +++ b/pkgs/development/idris-modules/tparsec.nix @@ -6,6 +6,8 @@ build-idris-package { name = "tparsec"; version = "2018-06-26"; + ipkgName = "TParsec"; + src = fetchFromGitHub { owner = "gallais"; repo = "idris-tparsec"; diff --git a/pkgs/development/idris-modules/vdom.nix b/pkgs/development/idris-modules/vdom.nix index 7f1ecb61c8ec..f6fdaf7a75e2 100644 --- a/pkgs/development/idris-modules/vdom.nix +++ b/pkgs/development/idris-modules/vdom.nix @@ -6,6 +6,8 @@ build-idris-package { name = "vdom"; version = "0.6.0"; + ipkgName = "idris-vdom"; + src = fetchFromGitHub { owner = "brandondyck"; repo = "idris-vdom"; diff --git a/pkgs/development/idris-modules/yaml.nix b/pkgs/development/idris-modules/yaml.nix index ec689ce4805a..61efb8cd575e 100644 --- a/pkgs/development/idris-modules/yaml.nix +++ b/pkgs/development/idris-modules/yaml.nix @@ -8,6 +8,7 @@ build-idris-package { name = "yaml"; version = "2018-01-25"; + ipkgName = "Yaml"; idrisDeps = [ contrib lightyear ]; src = fetchFromGitHub { diff --git a/pkgs/development/idris-modules/yampa.nix b/pkgs/development/idris-modules/yampa.nix index 0231555b4ad6..ebe92f468982 100644 --- a/pkgs/development/idris-modules/yampa.nix +++ b/pkgs/development/idris-modules/yampa.nix @@ -7,6 +7,7 @@ build-idris-package { name = "yampa"; version = "2016-07-05"; + ipkgName = "idris-yampa"; idrisDeps = [ bifunctors ]; src = fetchFromGitHub {