lol

libfixposix: reimplement using mkDerivation

+14 -43
+14 -43
pkgs/development/libraries/libfixposix/default.nix
··· 1 - x@{builderDefsPackage 2 - , fetchgit 3 - , autoconf, automake, libtool 4 - , ...}: 5 - builderDefsPackage 6 - (a : 7 - let 8 - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 9 - ["fetchgit"]; 1 + { stdenv, fetchurl, fetchgit, autoreconfHook, libtool }: 2 + 3 + stdenv.mkDerivation rec { 4 + name="libfixposix-${version}"; 5 + version="git-${src.rev}"; 10 6 11 - buildInputs = map (n: builtins.getAttr n x) 12 - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); 13 - sourceInfo = rec { 14 - method="fetchgit"; 15 - baseName="libfixposix"; 16 - url="https://github.com/sionescu/libfixposix"; 17 - rev="30b75609d858588ea00b427015940351896867e9"; 18 - version="git-${rev}"; 19 - name="${baseName}-${version}"; 20 - hash="44553c90d67f839cdd57d14d37d9faa25b1b766f607408896137f3013c1c9424"; 21 - }; 22 - in 23 - rec { 24 - srcDrv = a.fetchgit { 25 - url = sourceInfo.url; 26 - rev = sourceInfo.rev; 27 - sha256 = sourceInfo.hash; 7 + src = fetchgit { 8 + url = "https://github.com/sionescu/libfixposix"; 9 + rev = "30b75609d858588ea00b427015940351896867e9"; 10 + sha256 = "44553c90d67f839cdd57d14d37d9faa25b1b766f607408896137f3013c1c9424"; 28 11 }; 29 12 30 - src = srcDrv +"/"; 31 - 32 - inherit (sourceInfo) name version; 33 - inherit buildInputs; 34 - 35 - /* doConfigure should be removed if not needed */ 36 - phaseNames = ["doAutoreconf" "doConfigure" "doMakeInstall"]; 13 + buildInputs = [ autoreconfHook libtool ]; 37 14 38 - doAutoreconf = a.fullDepEntry ('' 39 - autoreconf -i 40 - '') ["doUnpack" "addInputs"]; 41 - 42 - meta = { 15 + meta = with stdenv.lib; { 43 16 description = "A set of workarounds for places in POSIX that get implemented differently"; 44 - maintainers = with a.lib.maintainers; 17 + maintainers = with maintainers; 45 18 [ 46 19 raskin 47 20 ]; 48 - platforms = with a.lib.platforms; 49 - linux; 21 + platforms = platforms.linux; 50 22 }; 51 23 passthru = { 52 24 updateInfo = { 53 25 downloadPage = "http://gitorious.org/libfixposix/libfixposix"; 54 26 }; 55 27 }; 56 - }) x 57 - 28 + }