Created
December 30, 2020 13:42
-
-
Save thenonameguy/ef2d380b7f5273431dd96f9d081f3093 to your computer and use it in GitHub Desktop.
NixOS zprint clojure local default.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, zlib, lib, qt5, saneBackends, makeWrapper, fetchurl }: | |
stdenv.mkDerivation rec { | |
name = "zprint-bin-${version}"; | |
version = "1.0.2"; | |
src = ./.; | |
dontConfigure = true; | |
dontBuild = true; | |
installPhase = '' | |
mkdir -p $out/bin | |
cp zprint $out/bin | |
''; | |
preFixup = let | |
# we prepare our library path in the let clause to avoid it become part of the input of mkDerivation | |
libPath = lib.makeLibraryPath [ | |
zlib | |
stdenv.cc.cc.lib | |
]; | |
in '' | |
patchelf \ | |
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ | |
--set-rpath "${libPath}" \ | |
$out/bin/zprint | |
''; | |
meta = with stdenv.lib; { | |
homepage = https://github.com/kkinnear/zprint; | |
description = "Library to reformat Clojure and Clojurescript source code and s-expressions "; | |
license = licenses.free; | |
platforms = platforms.linux; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment