depot/third_party/nixpkgs/pkgs/tools/compression/imagelol/default.nix
Default email a6d62be0d1 Project import generated by Copybara.
GitOrigin-RevId: ac169ec6371f0d835542db654a65e0f2feb07838
2021-12-26 18:43:05 +01:00

37 lines
934 B
Nix

{ lib, stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "imagelol";
version = "0.2";
src = fetchFromGitHub {
owner = "MCRedstoner2004";
repo = pname;
rev = "v${version}";
sha256 = "0978zdrfj41jsqm78afyyd1l64iki9nwjvhd8ynii1b553nn4dmd";
fetchSubmodules = true;
};
# fix for case-sensitive filesystems
# https://github.com/MCredstoner2004/ImageLOL/issues/1
postPatch = ''
mv imagelol src
substituteInPlace CMakeLists.txt \
--replace 'add_subdirectory("imagelol")' 'add_subdirectory("src")'
'';
nativeBuildInputs = [ cmake ];
installPhase = ''
mkdir -p $out/bin
cp ./ImageLOL $out/bin
'';
meta = with lib; {
homepage = "https://github.com/MCredstoner2004/ImageLOL";
description = "Simple program to store a file into a PNG image";
license = licenses.mit;
maintainers = [ maintainers.ivar ];
platforms = platforms.unix;
};
}