diff options
author | Elis Hirwing <elis@hirwing.se> | 2019-08-03 19:05:54 +0200 |
---|---|---|
committer | Elis Hirwing <elis@hirwing.se> | 2019-08-05 17:50:02 +0200 |
commit | 406fbdd67e4cd29a3304e88fbda5c34f91754c59 (patch) | |
tree | 985609c8db10f7da2d3eaaaf51070f1b12b46cdb | |
parent | 29cde60208ce6cf343c68394cff5bd84b6e6944d (diff) |
surf-display: init at 2019-04-15
-rw-r--r-- | pkgs/desktops/surf-display/default.nix | 53 | ||||
-rw-r--r-- | pkgs/desktops/surf-display/pdf-makefile.patch | 24 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
3 files changed, 79 insertions, 0 deletions
diff --git a/pkgs/desktops/surf-display/default.nix b/pkgs/desktops/surf-display/default.nix new file mode 100644 index 000000000000..f3554fe0b40a --- /dev/null +++ b/pkgs/desktops/surf-display/default.nix @@ -0,0 +1,53 @@ +{ stdenv, fetchgit, makeWrapper +, surf, wmctrl, matchbox, xdotool, unclutter +, xorg, pulseaudio, xprintidle-ng }: + +stdenv.mkDerivation rec { + pname = "surf-display"; + version = "unstable-2019-04-15"; + + src = fetchgit { + url = "https://code.it-zukunft-schule.de/cgit/surf-display"; + rev = "972d6c4b7c4503dbb63fa6c92cdc24d1e32064a4"; + sha256 = "03c68gg4kfmkri1gn5b7m1g8vh9ciawhajb29c17kkc7mn388hjm"; + }; + + nativeBuildInputs = [ makeWrapper ]; + + buildInputs = [ + surf + wmctrl + matchbox + pulseaudio + xprintidle-ng + xdotool + xorg.xmodmap + xorg.xkbutils + unclutter + ]; + + patches = [ ./pdf-makefile.patch ]; + + buildFlags = [ "man" ]; + + postFixup = '' + substituteInPlace $out/share/xsessions/surf-display.desktop \ + --replace surf-display $out/bin/surf-display + + substituteInPlace $out/bin/surf-display --replace /usr/share $out/share + + patchShebangs $out/bin/surf-display + wrapProgram $out/bin/surf-display \ + --prefix PATH ':' ${stdenv.lib.makeBinPath buildInputs} + ''; + + makeFlags = [ "PREFIX=${placeholder ''out''}" ]; + + meta = with stdenv.lib; { + description = "Kiosk browser session manager based on the surf browser"; + homepage = "https://code.it-zukunft-schule.de/cgit/surf-display/"; + maintainers = with maintainers; [ etu ]; + license = licenses.gpl2; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/surf-display/pdf-makefile.patch b/pkgs/desktops/surf-display/pdf-makefile.patch new file mode 100644 index 000000000000..9c2541052c0e --- /dev/null +++ b/pkgs/desktops/surf-display/pdf-makefile.patch @@ -0,0 +1,24 @@ +diff --git a/Makefile b/Makefile +index 1081d64..499160c 100644 +--- a/Makefile ++++ b/Makefile +@@ -13,19 +13,10 @@ man:: + gzip -9 -c -n data/surf-display.1 > data/surf-display.1.gz + + install: +- if [ ! -e data/surf-display.pdf.gz ]; then \ +- echo "Run 'make build' first, before running 'sudo make install'."; \ +- exit -1; \ +- fi +- + # script + mkdir -p $(DESTDIR)$(PREFIX)/bin/ + install -m 0755 bin/surf-display $(DESTDIR)$(PREFIX)/bin/ + +- # LaTeX Beamer PDF: Impressive HowTo +- mkdir -p $(DESTDIR)$(PREFIX)/share/doc/surf-display/ +- install -m 0644 data/*.pdf.gz $(DESTDIR)$(PREFIX)/share/doc/surf-display/ +- + # man page + mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1 + install -m 0644 data/*.1.gz $(DESTDIR)$(PREFIX)/share/man/man1/ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9d022733584c..f2b89a411d62 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20557,6 +20557,8 @@ in surf = callPackage ../applications/networking/browsers/surf { gtk = gtk2; }; + surf-display = callPackages ../desktops/surf-display { }; + sunvox = callPackage ../applications/audio/sunvox { }; swh_lv2 = callPackage ../applications/audio/swh-lv2 { }; |