Created
August 3, 2023 14:37
-
-
Save linusg/ae694478134fe7f4d6f04b42c60917f3 to your computer and use it in GitHub Desktop.
[WIP] ladybird-gtk4 nix shell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
gtk4Overlay = final: prev: { | |
gtk4 = prev.gtk4.overrideAttrs (old: rec { | |
version = "4.11.4"; | |
src = prev.fetchurl { | |
url = "mirror://gnome/sources/gtk/${prev.lib.versions.majorMinor version}/gtk-${version}.tar.xz"; | |
sha256 = "sha256-jSdisWecXhkQpcBCqlZx+cG5432o+kGn3+RNEksZyeg="; | |
}; | |
}); | |
}; | |
libadwaitaOverlay = final: prev: { | |
libadwaita = prev.libadwaita.overrideAttrs (old: rec { | |
version = "1.4.alpha"; | |
src = prev.fetchFromGitLab { | |
domain = "gitlab.gnome.org"; | |
owner = "GNOME"; | |
repo = "libadwaita"; | |
rev = "1.4.alpha"; | |
hash = "sha256-UUS5b6diRenpxxmGvVJoc6mVjEVGS9afLd8UKu+CJvI="; | |
}; | |
}); | |
}; | |
in | |
{ | |
pkgs ? | |
import <nixpkgs> { | |
overlays = [ | |
gtk4Overlay | |
libadwaitaOverlay | |
]; | |
}, | |
}: | |
pkgs.mkShell.override | |
{ | |
stdenv = pkgs.gcc12Stdenv; | |
} | |
{ | |
name = "ladybird-gtk4"; | |
nativeBuildInputs = with pkgs; [ | |
ccache | |
cmake | |
gobject-introspection | |
meson | |
ninja | |
pkg-config | |
]; | |
buildInputs = with pkgs; [ | |
glib | |
gtk4 | |
gtk4.dev | |
libadwaita | |
libxcrypt | |
]; | |
shellHook = '' | |
export GI_TYPELIB_PATH="$GI_TYPELIB_PATH:${pkgs.gtk4}/lib/girepository-1.0:${pkgs.libadwaita}/lib/girepository-1.0"; | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment