Handle variable overrides correctly
This commit is contained in:
parent
1dabc4442d
commit
b8cbd8929b
@ -39,8 +39,8 @@ opam2nix OPAM {..} =
|
||||
preparephase = mconcat . intersperse " " . mconcat . intersperse ["\n"]
|
||||
in
|
||||
"{ stdenv, fetchzip, " <>deps<> ", extraArgs ? { } }:\n"
|
||||
<>"with extraArgs;\n" -- Awful hack to allow this to evaluate even if some of the variables are undefined
|
||||
<>"stdenv.mkDerivation (rec {\n"
|
||||
<>"\n" -- Awful hack to allow this to evaluate even if some of the variables are undefined
|
||||
<>"stdenv.mkDerivation (let self = with self; with extraArgs; {\n"
|
||||
<>foldMap (\name' -> " pname = \""<>name'<>"\";\n") name
|
||||
<>foldMap (\version' -> " version = \""<>version'<>"\";\n") version
|
||||
<>foldMap (\url -> " src = builtins.fetchTarball { url = \""<>url<>"\"; };\n") source
|
||||
@ -58,7 +58,7 @@ opam2nix OPAM {..} =
|
||||
<>preparephase checkPhase'
|
||||
<>"\nrunHook postCheck\n'';\n") checkPhase
|
||||
<>" installPhase = ''\nrunHook preInstall\nopaline -prefix $out -libdir $OCAMLFIND_DESTDIR\nrunHook postInstall\n'';\n"
|
||||
<>"} // extraArgs)\n"
|
||||
<>"}; in self // extraArgs)\n"
|
||||
|
||||
update :: Maybe a -> a -> Maybe a
|
||||
update old new = if isNothing old then Just new else old
|
||||
|
@ -1,5 +1,5 @@
|
||||
opam-version: "2.0"
|
||||
name: "tezos-memory-proto-alpha"
|
||||
name: "memory-proto-alpha"
|
||||
version: "1.0"
|
||||
synopsis: "Tezos Protocol Alpha in memory"
|
||||
maintainer: "Galfour <ligolang@gmail.com>"
|
||||
|
Loading…
Reference in New Issue
Block a user