about summary refs log tree commit diff
path: root/pkgs/applications/editors/bless
diff options
context:
space:
mode:
authorMaciej Krüger <mkg20001@gmail.com>2019-12-15 00:43:16 +0100
committerMaciej Krüger <mkg20001@gmail.com>2020-02-01 13:01:46 +0100
commit72337bec2269700c9aff5fc16dbca44b3975c290 (patch)
tree19029295b654b81168013e6984f525823ff70a7e /pkgs/applications/editors/bless
parentaf9bb2af8f01a1638bbd2f57b60df494ac0720e9 (diff)
bless: init at 0.6.2
Diffstat (limited to 'pkgs/applications/editors/bless')
-rw-r--r--pkgs/applications/editors/bless/default.nix80
1 files changed, 80 insertions, 0 deletions
diff --git a/pkgs/applications/editors/bless/default.nix b/pkgs/applications/editors/bless/default.nix
new file mode 100644
index 0000000000000..b3c3caae4e451
--- /dev/null
+++ b/pkgs/applications/editors/bless/default.nix
@@ -0,0 +1,80 @@
+{ 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 stdenv.lib; {
+    homepage = "https://github.com/afrantzis/bless";
+    description = "Gtk# Hex Editor";
+    maintainers = [ maintainers.mkg20001 ];
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    badPlatforms = [ "aarch64-linux" ];
+  };
+}