Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 60 lines 1.5 kB view raw
1{ 2 lib, 3 rustPlatform, 4 fetchFromGitHub, 5 stdenv, 6 pkg-config, 7 expat, 8 fontconfig, 9 freetype, 10 libGL, 11 xorg, 12}: 13 14rustPlatform.buildRustPackage rec { 15 pname = "epick"; 16 version = "0.9.0"; 17 18 src = fetchFromGitHub { 19 owner = "vv9k"; 20 repo = "epick"; 21 # Upstream has rewritten tags on multiple occasions. 22 rev = "14ee92e049780406fffdc1e4a83bf1433775663f"; 23 sha256 = "sha256-gjqAQrGJ9KFdzn2a3fOgu0VJ9zrX5stsbzriOGJaD/4="; 24 }; 25 26 cargoHash = "sha256-r/0aNzU8jm2AqiZWq4plxXY/H7qKVC8nEI9BwOUKCdA="; 27 28 nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ 29 pkg-config 30 ]; 31 32 buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ 33 expat 34 fontconfig 35 freetype 36 xorg.libX11 37 xorg.libXcursor 38 xorg.libXi 39 xorg.libXrandr 40 ]; 41 42 postInstall = '' 43 install -Dm444 assets/epick.desktop -t $out/share/applications 44 install -Dm444 assets/icon.svg $out/share/icons/hicolor/scalable/apps/epick.svg 45 install -Dm444 assets/icon.png $out/share/icons/hicolor/48x48/apps/epick.png 46 ''; 47 48 postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' 49 patchelf $out/bin/epick --add-rpath ${lib.makeLibraryPath [ libGL ]} 50 ''; 51 52 meta = { 53 description = "Simple color picker that lets the user create harmonic palettes with ease"; 54 homepage = "https://github.com/vv9k/epick"; 55 changelog = "https://github.com/vv9k/epick/blob/${version}/CHANGELOG.md"; 56 license = lib.licenses.gpl3Only; 57 maintainers = with lib.maintainers; [ figsoda ]; 58 mainProgram = "epick"; 59 }; 60}