2021-04-25 23:32:06 +01:00
|
|
|
{ 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;
|
|
|
|
};
|
|
|
|
|
2021-12-16 22:52:01 +00:00
|
|
|
# fix for case-sensitive filesystems
|
|
|
|
# https://github.com/MCredstoner2004/ImageLOL/issues/1
|
|
|
|
postPatch = ''
|
2021-12-17 14:52:49 +00:00
|
|
|
mv imagelol src
|
2021-12-16 22:52:01 +00:00
|
|
|
substituteInPlace CMakeLists.txt \
|
|
|
|
--replace 'add_subdirectory("imagelol")' 'add_subdirectory("src")'
|
|
|
|
'';
|
|
|
|
|
2021-04-25 23:32:06 +01:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|