forked from mirrors/nixpkgs
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
81 lines
1.8 KiB
Nix
81 lines
1.8 KiB
Nix
{ lib, stdenv
|
|
, fetchFromGitHub
|
|
, autoreconfHook
|
|
, pkgconfig
|
|
, mono
|
|
, gtk-sharp-2_0
|
|
, gettext
|
|
, makeWrapper
|
|
, glib
|
|
, gtk2-x11
|
|
, gnome2
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "bless";
|
|
version = "0.6.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "afrantzis";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "04ra2mcx3pkhzbhcz0zwfmbpqj6cwisrypi6xbc2d6pxd4hdafn1";
|
|
};
|
|
|
|
buildInputs = [
|
|
gtk-sharp-2_0
|
|
mono
|
|
# runtime only deps
|
|
glib
|
|
gtk2-x11
|
|
gnome2.libglade
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
pkgconfig
|
|
autoreconfHook
|
|
gettext
|
|
makeWrapper
|
|
];
|
|
|
|
configureFlags = [
|
|
# scrollkeeper is a gnome2 package, so it must be old and we shouldn't really support it
|
|
# NOTE: that sadly doesn't turn off the compilation of the manual with scrollkeeper, so we have to fake the binaries below
|
|
"--without-scrollkeeper"
|
|
];
|
|
|
|
autoreconfPhase = ''
|
|
mkdir _bin
|
|
|
|
# this fakes the scrollkeeper commands, to keep the build happy
|
|
for f in scrollkeeper-preinstall scrollkeeper-update; do
|
|
echo "true" > ./_bin/$f
|
|
chmod +x ./_bin/$f
|
|
done
|
|
|
|
export PATH="$PWD/_bin:$PATH"
|
|
|
|
# and it also wants to install that file
|
|
touch ./doc/user/bless-manual.omf
|
|
|
|
# patch mono path
|
|
sed "s|^mono|${mono}/bin/mono|g" -i src/bless-script.in
|
|
|
|
./autogen.sh
|
|
'';
|
|
|
|
preFixup = ''
|
|
MPATH="${gtk-sharp-2_0}/lib/mono/gtk-sharp-2.0:${glib.out}/lib:${gtk2-x11}/lib:${gnome2.libglade}/lib:${gtk-sharp-2_0}/lib"
|
|
wrapProgram $out/bin/bless --prefix MONO_PATH : "$MPATH" --prefix LD_LIBRARY_PATH : "$MPATH"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/afrantzis/bless";
|
|
description = "Gtk# Hex Editor";
|
|
maintainers = [ maintainers.mkg20001 ];
|
|
license = licenses.gpl2;
|
|
platforms = platforms.linux;
|
|
badPlatforms = [ "aarch64-linux" ];
|
|
};
|
|
}
|