barcode: reimplement using mkDerivation

+12 -33
+12 -33
pkgs/tools/graphics/barcode/default.nix
··· 1 - x@{builderDefsPackage 2 - , ...}: 3 - builderDefsPackage 4 - (a : 5 - let 6 - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 7 - []; 8 9 - buildInputs = map (n: builtins.getAttr n x) 10 - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); 11 - sourceInfo = rec { 12 - version = "0.99"; 13 - baseName="barcode"; 14 - name="${baseName}-${version}"; 15 - url="mirror://gnu/${baseName}/${name}.tar.xz"; 16 - }; 17 - in 18 - rec { 19 - src = a.fetchurl { 20 - url = sourceInfo.url; 21 sha256 = "1indapql5fjz0bysyc88cmc54y8phqrbi7c76p71fgjp45jcyzp8"; 22 }; 23 24 - inherit (sourceInfo) name version; 25 - inherit buildInputs; 26 - 27 - /* doConfigure should be removed if not needed */ 28 - phaseNames = ["doConfigure" "doMakeInstall"]; 29 - 30 - meta = { 31 description = "GNU barcode generator"; 32 - maintainers = with a.lib.maintainers; 33 - [ 34 - raskin 35 - ]; 36 - platforms = with a.lib.platforms; allBut darwin; 37 downloadPage = "http://ftp.gnu.org/gnu/barcode/"; 38 updateWalker = true; 39 inherit version; 40 }; 41 - }) x 42 -
··· 1 + { stdenv, fetchurl }: 2 3 + stdenv.mkDerivation rec { 4 + name = "${pname}-${version}"; 5 + version = "0.99"; 6 + pname = "barcode"; 7 + src = fetchurl { 8 + url = "mirror://gnu/${pname}/${name}.tar.xz"; 9 sha256 = "1indapql5fjz0bysyc88cmc54y8phqrbi7c76p71fgjp45jcyzp8"; 10 }; 11 12 + meta = with stdenv.lib; { 13 description = "GNU barcode generator"; 14 + maintainers = with maintainers; [ raskin ]; 15 + platforms = with platforms; allBut darwin; 16 downloadPage = "http://ftp.gnu.org/gnu/barcode/"; 17 updateWalker = true; 18 inherit version; 19 + homepage = http://ftp.gnu.org/gnu/barcode/; 20 }; 21 + }