Skip to content

Instantly share code, notes, and snippets.

@MarcWeber
Last active September 11, 2020 09:49
Show Gist options
  • Save MarcWeber/7dd7a2866e9a7178000743d5403de520 to your computer and use it in GitHub Desktop.
Save MarcWeber/7dd7a2866e9a7178000743d5403de520 to your computer and use it in GitHub Desktop.
nix nixos nixpkgs google webdesigner
Let's hope google finds this for people who are interested.
TODO: license etc
Add to your all-packages.nix:
google_webdesigner = stdenv.mkDerivation {
# does run with
src = pkgs.fetchurl {
url = https://dl.google.com/linux/direct/google-webdesigner_current_amd64.deb;
sha256 = "1d3ablx7ywxc083digzg1hrfkbffmc39ghm7d83i84h7cla0mv8x";
};
nativeBuildInputs = [ pkgs.dpkg ];
unpackPhase = "dpkg -x $src ./ || true";
# src = fetchurl {
# url = "https://dl.google.com/linux/direct/google-webdesigner_current_x86_64.rpm";
# sha256 = "1p5p4azrhyjplq0lia24lzlgc577hijp7ya8m2g8grgh5gvvj255";
# };
# nativeBuildInputs = [ rpmextract ];
# unpackPhase = '' rpmextract $src || true '';
name = "google_webdesigner";
buildInputs = [
pkgs.autoPatchelfHook
makeWrapper
]
++ ( with pkgs; with pkgs.xorg; [
qt4 zlib stdenv.cc.cc libSM libICE libX11 libXext libXt libGLU libGL
glib gtk2 gdk-pixbuf
libXtst
libX11
libxcb
libXtst
libXScrnSaver
# libXss
dbus
pango
cairo
cups
mesa
alsaLib
at-spi2-core
at-spi2-atk
nss
mimeo
nspr
]);
# using steam-run is hacky - investigate why it segfualts without
installPhase = ''
mkdir -p $out
cp -ra usr/bin $out
cp -ra usr/share $out
cp -ra opt $out
s=$out/bin/google-webdesigner
rm $s
cat > $s <<EOF
#!/bin/sh
exec ${steam-run}/bin/steam-run $out/opt/google/webdesigner/webdesigner -- "\$@"
EOF
chmod +x $s
runHook postInstall
'';
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment