From fd9c13956f2e728249421d79f2a71a3e987b5aa2 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 16 Apr 2015 18:04:06 +0200 Subject: [PATCH] libffcall: port to mkDerivation Also set meta.{license,platforms} (the latter is guesswork). --- .../libraries/libffcall/default.nix | 32 +++++++------------ pkgs/top-level/all-packages.nix | 4 +-- 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/pkgs/development/libraries/libffcall/default.nix b/pkgs/development/libraries/libffcall/default.nix index 0be604c62461..530b04e8b42e 100644 --- a/pkgs/development/libraries/libffcall/default.nix +++ b/pkgs/development/libraries/libffcall/default.nix @@ -1,38 +1,28 @@ -a : -let - fetchurl = a.fetchurl; +{ stdenv, fetchcvs }: - version = a.lib.attrByPath ["version"] "2009-05-27" a; - buildInputs = with a; [ - - ]; -in -rec { - src = a.fetchcvs { +stdenv.mkDerivation rec { + name = "libffcall-${version}"; + version = "2009-05-27"; + src = fetchcvs { cvsRoot = ":pserver:anonymous@cvs.savannah.gnu.org:/sources/libffcall"; module = "ffcall"; date = version; - sha256 = "91bcb5a20c85a9ccab45886aae8fdbbcf1f20f995ef898e8bdd2964448daf724"; + sha256 = "097pv94495njppl9iy2yk47z5wdwvf7swsl88nmwrac51jibbg4i"; }; - inherit buildInputs; - configureFlags = []; - - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "doMakeInstall"]; - - doConfigure = a.fullDepEntry ('' + configurePhase = '' for i in ./configure */configure; do cwd="$PWD" - cd "$(dirname "$i")"; + cd "$(dirname "$i")"; ( test -f Makefile && make distclean ) || true ./configure --prefix=$out cd "$cwd" done - '') a.doConfigure.deps; + ''; - name = "libffcall-" + version; meta = { description = "Foreign function call library"; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.unix; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b73c975bd126..9380fb55a4e5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6476,9 +6476,7 @@ let libfixposix = callPackage ../development/libraries/libfixposix {}; - libffcall = builderDefsPackage (import ../development/libraries/libffcall) { - inherit fetchcvs; - }; + libffcall = callPackage ../development/libraries/libffcall { }; libffi = callPackage ../development/libraries/libffi { };