nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 69 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 help2man, 6 lz4, 7 lzo, 8 nixosTests, 9 which, 10 xz, 11 zlib, 12 zstd, 13}: 14 15stdenv.mkDerivation (finalAttrs: { 16 pname = "squashfs"; 17 version = "4.7.4"; 18 19 src = fetchFromGitHub { 20 owner = "plougher"; 21 repo = "squashfs-tools"; 22 rev = finalAttrs.version; 23 hash = "sha256-xvTSGVwtzJjoAIF6GClASUIB5eIk+uquQNNzHIuwkuY="; 24 }; 25 26 strictDeps = true; 27 nativeBuildInputs = [ 28 which 29 ] 30 # when cross-compiling help2man cannot run the cross-compiled binary 31 ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ help2man ]; 32 buildInputs = [ 33 zlib 34 xz 35 zstd 36 lz4 37 lzo 38 ]; 39 40 preBuild = '' 41 cd squashfs-tools 42 ''; 43 44 installFlags = [ 45 "INSTALL_DIR=${placeholder "out"}/bin" 46 "INSTALL_MANPAGES_DIR=${placeholder "out"}/share/man/man1" 47 ]; 48 49 makeFlags = [ 50 "XZ_SUPPORT=1" 51 "ZSTD_SUPPORT=1" 52 "LZ4_SUPPORT=1" 53 "LZMA_XZ_SUPPORT=1" 54 "LZO_SUPPORT=1" 55 ]; 56 57 passthru.tests = { 58 nixos-iso-boots-and-verifies = nixosTests.boot.biosCdrom; 59 }; 60 61 meta = { 62 homepage = "https://github.com/plougher/squashfs-tools"; 63 description = "Tool for creating and unpacking squashfs filesystems"; 64 platforms = lib.platforms.unix; 65 license = lib.licenses.gpl2Plus; 66 maintainers = with lib.maintainers; [ ruuda ]; 67 mainProgram = "mksquashfs"; 68 }; 69})