Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

namecoin: fix version parsing for nix-env, reduce with lib usage

+5 -6
+5 -6
pkgs/applications/blockchains/namecoin/default.nix
··· 1 1 { lib, stdenv, fetchFromGitHub, openssl, boost, libevent, autoreconfHook, db4, miniupnpc, eject, pkg-config, qt4, protobuf, qrencode, hexdump 2 2 , withGui }: 3 3 4 - with lib; 5 4 stdenv.mkDerivation rec { 6 - pname = "namecoin" + optionalString (!withGui) "d"; 7 - version = "nc22.0"; 5 + pname = "namecoin" + lib.optionalString (!withGui) "d"; 6 + version = "22.0"; 8 7 9 8 src = fetchFromGitHub { 10 9 owner = "namecoin"; 11 10 repo = "namecoin-core"; 12 - rev = version; 11 + rev = "nc${version}"; 13 12 sha256 = "sha256-Z3CLDe0c4IpFPPTie8yoh0kcuvGmiegSgl4ITNSDkgY="; 14 13 }; 15 14 ··· 26 25 db4 27 26 miniupnpc 28 27 eject 29 - ] ++ optionals withGui [ 28 + ] ++ lib.optionals withGui [ 30 29 qt4 31 30 protobuf 32 31 qrencode ··· 38 37 "--with-boost-libdir=${boost.out}/lib" 39 38 ]; 40 39 41 - meta = { 40 + meta = with lib; { 42 41 description = "Decentralized open source information registration and transfer system based on the Bitcoin cryptocurrency"; 43 42 homepage = "https://namecoin.org"; 44 43 license = licenses.mit;