Created
September 5, 2019 14:41
-
-
Save jmackie/d29d51bc967f6d7086c67993a821a39b to your computer and use it in GitHub Desktop.
NixOS revery-ui
This file contains 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 | |
pkgs = import <nixpkgs> { }; | |
reasonml = import ../reasonml.nix { inherit pkgs; }; | |
libs = p: with p; [ gtk3-x11.dev pango.dev glib.dev cairo.dev gdk-pixbuf.dev atk.dev ]; | |
pkg-config = p: p.stdenv.mkDerivation { | |
# revery looks for gtk headers via... | |
# pkg-config --cflags gtk+-x11-3.0 | |
name = "pkg-config-wrapped"; | |
buildInputs = [ p.makeWrapper ] ++ libs p; | |
buildCommand = '' | |
mkdir -p $out/bin | |
makeWrapper ${p.pkg-config}/bin/pkg-config $out/bin/pkg-config \ | |
--set PKG_CONFIG_PATH ${p.lib.makeSearchPath "lib/pkgconfig" (libs p)} | |
''; | |
}; | |
fhs = reasonml.esy-env { | |
targetPkgs = p: | |
[ | |
p.neovim | |
(pkg-config p) | |
p.libpng | |
p.freetype | |
p.zlib | |
p.gtk3-x11 | |
p.harfbuzz | |
]; | |
}; | |
in pkgs.stdenv.mkDerivation { | |
name = "esy-env-shell"; | |
buildInputs = [ fhs ]; | |
shellHook = "exec esy-env"; | |
} |
This file contains 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
{ | |
"name": "revery-quick-start", | |
"version": "1.3.0", | |
"description": "Revery quickstart", | |
"license": "MIT", | |
"esy": { | |
"build": "refmterr dune build -p App", | |
"buildsInSource": "_build" | |
}, | |
"dependencies": { | |
"ocaml": "~4.7.0", | |
"revery": "0.26.0", | |
"@opam/dune": "1.7.3" | |
}, | |
"resolutions": { | |
"@opam/cmdliner": "1.0.2", | |
"pesy": "0.4.1", | |
"@brisk/brisk-reconciler": "github:briskml/brisk-reconciler#daa00be", | |
"rebez": "github:jchavarri/rebez#46cbc183", | |
"@brisk/brisk-reconciler": "github:briskml/brisk-reconciler#dd933fc", | |
"@opam/merlin-extend": "0.4", | |
"esy-glfw": "github:jmackie/esy-glfw#5757e57fff7dc2295325aa94fce577cb861494cd" | |
}, | |
"scripts": { | |
"format": "bash -c \"refmt --in-place *.re\"", | |
"run": "esy x App" | |
}, | |
"devDependencies": { | |
"ocaml": "~4.7.0", | |
"@opam/merlin": "*" | |
} | |
} |
Hey @jmackie :) Just following up on above. Couldn't find that fork on your profile.
Really sorry, totally blanked on this one.
../reasonml.nix
is 👉 https://github.com/jmackie/reasonml.nix
I definitely got this working, but I can't honestly remember how "latest" these files are. If it doesn't work for you then let me know and I'll dig out the project I got working!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey man, I've got a working fork of the quickstart somewhere that I'll post when I'm next at my computer. I think this gist was just a note to self at some point so might not actually be useful 🤷♂️