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

Merge pull request #320589 from doronbehar/pkg/wiringPi

wiringpi: 2.61-1 -> 3.6

authored by Doron Behar and committed by GitHub de68bb0a 64eff64c

+38 -34
+38 -34
pkgs/os-specific/linux/wiringpi/default.nix
··· 1 - { lib 2 - , stdenv 3 - , symlinkJoin 4 - , fetchFromGitHub 5 - , libxcrypt 1 + { 2 + lib, 3 + stdenv, 4 + symlinkJoin, 5 + fetchFromGitHub, 6 + libxcrypt, 6 7 }: 7 8 8 9 let 9 - version = "2.61-1"; 10 - mkSubProject = { subprj # The only mandatory argument 11 - , buildInputs ? [] 12 - , src ? fetchFromGitHub { 10 + version = "3.6"; 11 + srcAll = fetchFromGitHub { 13 12 owner = "WiringPi"; 14 13 repo = "WiringPi"; 15 14 rev = version; 16 - sha256 = "sha256-VxAaPhaPXd9xYt663Ju6SLblqiSLizauhhuFqCqbO5M="; 17 - } 18 - }: stdenv.mkDerivation (finalAttrs: { 19 - pname = "wiringpi-${subprj}"; 20 - inherit version src; 21 - sourceRoot = "${src.name}/${subprj}"; 22 - inherit buildInputs; 23 - # Remove (meant for other OSs) lines from Makefiles 24 - preInstall = '' 25 - sed -i "/chown root/d" Makefile 26 - sed -i "/chmod/d" Makefile 27 - ''; 28 - makeFlags = [ 29 - "DESTDIR=${placeholder "out"}" 30 - "PREFIX=/." 31 - # On NixOS we don't need to run ldconfig during build: 32 - "LDCONFIG=echo" 33 - ]; 34 - }); 15 + sha256 = "sha256-Hw81Ua9LTb/9l3Js1rx8TfCOF59MrrvH6AGsAsG1SoE="; 16 + }; 17 + mkSubProject = 18 + { 19 + subprj, # The only mandatory argument 20 + buildInputs ? [ ], 21 + src ? srcAll, 22 + }: 23 + stdenv.mkDerivation (finalAttrs: { 24 + pname = "wiringpi-${subprj}"; 25 + inherit version src; 26 + sourceRoot = "${src.name}/${subprj}"; 27 + inherit buildInputs; 28 + # Remove (meant for other OSs) lines from Makefiles 29 + preInstall = '' 30 + sed -i "/chown root/d" Makefile 31 + sed -i "/chmod/d" Makefile 32 + ''; 33 + makeFlags = [ 34 + "DESTDIR=${placeholder "out"}" 35 + "PREFIX=/." 36 + # On NixOS we don't need to run ldconfig during build: 37 + "LDCONFIG=echo" 38 + ]; 39 + }); 35 40 passthru = { 41 + # Helps nix-update and probably nixpkgs-update find the src of this package 42 + # automatically. 43 + src = srcAll; 36 44 inherit mkSubProject; 37 45 wiringPi = mkSubProject { 38 46 subprj = "wiringPi"; 39 - buildInputs = [ 40 - libxcrypt 41 - ]; 47 + buildInputs = [ libxcrypt ]; 42 48 }; 43 49 devLib = mkSubProject { 44 50 subprj = "devLib"; 45 - buildInputs = [ 46 - passthru.wiringPi 47 - ]; 51 + buildInputs = [ passthru.wiringPi ]; 48 52 }; 49 53 wiringPiD = mkSubProject { 50 54 subprj = "wiringPiD";