mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 15:41:48 +00:00
eql: reimplement using mkDerivation
This commit is contained in:
parent
342cf232ea
commit
79a827c7fb
@ -1,54 +1,37 @@
|
|||||||
x@{builderDefsPackage
|
{ stdenv, fetchgit, qt4, ecl, xorgserver, xkbcomp, xkeyboard_config }:
|
||||||
, fetchgit, qt4, ecl, xorgserver
|
|
||||||
, xkbcomp, xkeyboard_config
|
|
||||||
, ...}:
|
|
||||||
builderDefsPackage
|
|
||||||
(a :
|
|
||||||
let
|
|
||||||
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
|
||||||
["fetchgit"];
|
|
||||||
|
|
||||||
buildInputs = map (n: builtins.getAttr n x)
|
stdenv.mkDerivation rec {
|
||||||
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
version = src.rev;
|
||||||
sourceInfo = rec {
|
name = "eql-git-${version}";
|
||||||
method = "fetchgit";
|
src = fetchgit {
|
||||||
rev = "9097bf98446ee33c07bb155d800395775ce0d9b2";
|
rev = "9097bf98446ee33c07bb155d800395775ce0d9b2";
|
||||||
url = "git://gitorious.org/eql/eql";
|
url = "https://gitlab.com/eql/eql.git";
|
||||||
hash = "1fp88xmmk1sa0iqxahfiv818bp2sbf66vqrd4xq9jb731ybdvsb8";
|
sha256 = "1fp88xmmk1sa0iqxahfiv818bp2sbf66vqrd4xq9jb731ybdvsb8";
|
||||||
version = rev;
|
|
||||||
name = "eql-git-${version}";
|
|
||||||
};
|
};
|
||||||
in
|
|
||||||
rec {
|
|
||||||
srcDrv = a.fetchgit {
|
|
||||||
url = sourceInfo.url;
|
|
||||||
sha256 = sourceInfo.hash;
|
|
||||||
rev = sourceInfo.rev;
|
|
||||||
};
|
|
||||||
src = srcDrv + "/";
|
|
||||||
|
|
||||||
inherit (sourceInfo) name version;
|
buildInputs = [ ecl qt4 xorgserver xkbcomp xkeyboard_config ];
|
||||||
inherit buildInputs;
|
|
||||||
|
|
||||||
phaseNames = ["setVars" "fixPaths" "doQMake" "doMake" "doDeploy"];
|
NIX_CFLAGS_COMPILE = "-fPIC";
|
||||||
|
|
||||||
setVars = a.fullDepEntry (''
|
postPatch = ''
|
||||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fPIC"
|
|
||||||
'') [];
|
|
||||||
|
|
||||||
fixPaths = a.fullDepEntry (''
|
|
||||||
sed -re 's@[(]in-home "gui/.command-history"[)]@(concatenate '"'"'string (ext:getenv "HOME") "/.eql-gui-command-history")@' -i gui/gui.lisp
|
sed -re 's@[(]in-home "gui/.command-history"[)]@(concatenate '"'"'string (ext:getenv "HOME") "/.eql-gui-command-history")@' -i gui/gui.lisp
|
||||||
'') ["minInit" "doUnpack"];
|
'';
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
cd src
|
||||||
|
ecl -shell make-eql-lib.lisp
|
||||||
|
qmake eql_lib.pro
|
||||||
|
make
|
||||||
|
cd ..
|
||||||
|
|
||||||
doQMake = a.fullDepEntry (''
|
|
||||||
cd src
|
cd src
|
||||||
qmake eql_exe.pro
|
qmake eql_exe.pro
|
||||||
make
|
make
|
||||||
cd ..
|
cd ..
|
||||||
cd src
|
cd src
|
||||||
'') ["addInputs" "doUnpack" "buildEQLLib"];
|
'';
|
||||||
|
|
||||||
doDeploy = a.fullDepEntry (''
|
installPhase = ''
|
||||||
cd ..
|
cd ..
|
||||||
mkdir -p $out/bin $out/lib/eql/ $out/include $out/include/gen $out/lib
|
mkdir -p $out/bin $out/lib/eql/ $out/include $out/include/gen $out/lib
|
||||||
cp -r . $out/lib/eql/build-dir
|
cp -r . $out/lib/eql/build-dir
|
||||||
@ -56,35 +39,22 @@ rec {
|
|||||||
ln -s $out/lib/eql/build-dir/src/*.h $out/include
|
ln -s $out/lib/eql/build-dir/src/*.h $out/include
|
||||||
ln -s $out/lib/eql/build-dir/src/gen/*.h $out/include/gen
|
ln -s $out/lib/eql/build-dir/src/gen/*.h $out/include/gen
|
||||||
ln -s $out/lib/eql/build-dir/libeql*.so* $out/lib
|
ln -s $out/lib/eql/build-dir/libeql*.so* $out/lib
|
||||||
'') ["minInit"];
|
'';
|
||||||
|
|
||||||
buildEQLLib = a.fullDepEntry (''
|
meta = with stdenv.lib; {
|
||||||
cd src
|
|
||||||
ecl -shell make-eql-lib.lisp
|
|
||||||
qmake eql_lib.pro
|
|
||||||
make
|
|
||||||
cd ..
|
|
||||||
'') ["doUnpack" "addInputs"];
|
|
||||||
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "Embedded Qt Lisp (ECL+Qt)";
|
description = "Embedded Qt Lisp (ECL+Qt)";
|
||||||
maintainers = with a.lib.maintainers;
|
maintainers = with maintainers; [ raskin ];
|
||||||
[
|
platforms = with platforms; linux;
|
||||||
raskin
|
license = licenses.mit;
|
||||||
];
|
|
||||||
platforms = with a.lib.platforms;
|
|
||||||
linux;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
updateInfo = {
|
updateInfo = {
|
||||||
downloadPage = "http://password-taxi.at/EQL";
|
downloadPage = "http://password-taxi.at/EQL";
|
||||||
method = "fetchgit";
|
method = "fetchgit";
|
||||||
rev = "370b7968fd73d5babc81e35913a37111a788487f";
|
rev = src.rev;
|
||||||
url = "git://gitorious.org/eql/eql";
|
url = src.url;
|
||||||
hash = "2370e111d86330d178f3ec95e8fed13607e51fed8859c6e95840df2a35381636";
|
hash = src.sha256;
|
||||||
};
|
};
|
||||||
inherit srcDrv;
|
|
||||||
};
|
};
|
||||||
}) x
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user