Skip to content

Instantly share code, notes, and snippets.

@thenonameguy
Created December 30, 2020 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thenonameguy/ef2d380b7f5273431dd96f9d081f3093 to your computer and use it in GitHub Desktop.
Save thenonameguy/ef2d380b7f5273431dd96f9d081f3093 to your computer and use it in GitHub Desktop.
NixOS zprint clojure local default.nix
{ 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