diff options
Diffstat (limited to 'corepkgs')
-rw-r--r-- | corepkgs/fetchurl/Makefile.am | 11 | ||||
-rw-r--r-- | corepkgs/fetchurl/builder.sh.in (renamed from corepkgs/fetchurl/fetchurl.sh.in) | 0 | ||||
-rw-r--r-- | corepkgs/fetchurl/default.nix | 8 | ||||
-rw-r--r-- | corepkgs/fetchurl/fetchurl.fix | 10 |
4 files changed, 14 insertions, 15 deletions
diff --git a/corepkgs/fetchurl/Makefile.am b/corepkgs/fetchurl/Makefile.am index 0c8f0c9399ef..270bf0142488 100644 --- a/corepkgs/fetchurl/Makefile.am +++ b/corepkgs/fetchurl/Makefile.am @@ -1,10 +1,11 @@ -all-local: fetchurl.sh +all-local: builder.sh install-exec-local: - $(INSTALL) -d $(datadir)/fix/fetchurl - $(INSTALL_DATA) fetchurl.fix $(datadir)/fix/fetchurl - $(INSTALL_PROGRAM) fetchurl.sh $(datadir)/fix/fetchurl + $(INSTALL) -d $(datadir)/nix/corepkgs + $(INSTALL) -d $(datadir)/nix/corepkgs/fetchurl + $(INSTALL_DATA) default.nix $(datadir)/nix/corepkgs/fetchurl + $(INSTALL_PROGRAM) builder.sh $(datadir)/nix/corepkgs/fetchurl include ../../substitute.mk -EXTRA_DIST = fetchurl.fix fetchurl.sh.in +EXTRA_DIST = default.nix builder.sh.in diff --git a/corepkgs/fetchurl/fetchurl.sh.in b/corepkgs/fetchurl/builder.sh.in index a6cc6993028a..a6cc6993028a 100644 --- a/corepkgs/fetchurl/fetchurl.sh.in +++ b/corepkgs/fetchurl/builder.sh.in diff --git a/corepkgs/fetchurl/default.nix b/corepkgs/fetchurl/default.nix new file mode 100644 index 000000000000..663bba4a3800 --- /dev/null +++ b/corepkgs/fetchurl/default.nix @@ -0,0 +1,8 @@ +{system, url, md5}: derivation { + name = baseNameOf (toString url); + system = system; + builder = ./builder.sh; + url = url; + md5 = md5; + id = md5; +} diff --git a/corepkgs/fetchurl/fetchurl.fix b/corepkgs/fetchurl/fetchurl.fix deleted file mode 100644 index 0221b612cfe3..000000000000 --- a/corepkgs/fetchurl/fetchurl.fix +++ /dev/null @@ -1,10 +0,0 @@ -Function(["url", "md5"], - Package( - [ ("build", Relative("fetchurl/fetchurl.sh")) - , ("url", Var("url")) - , ("md5", Var("md5")) - , ("name", BaseName(Var("url"))) - , ("id", Var("md5")) - ] - ) -) |