forked from marko/svitak
improve environment setup for guix users
This commit is contained in:
parent
37ee16bcf8
commit
2fd5982020
2 changed files with 77 additions and 0 deletions
56
guix.scm
Normal file
56
guix.scm
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
(use-modules (guix packages)
|
||||
(guix download)
|
||||
(guix build-system trivial)
|
||||
((guix licenses) #:prefix license:)
|
||||
(gnu packages haskell)
|
||||
(gnu packages haskell-xyz)
|
||||
(gnu packages haskell-apps)
|
||||
(gnu packages pkg-config)
|
||||
(gnu packages commencement)
|
||||
(gnu packages gtk)
|
||||
(gnu packages glib)
|
||||
(gnu packages compression)
|
||||
(gnu packages base)
|
||||
(gnu packages linux)
|
||||
(gnu packages webkit)
|
||||
(gnu packages build-tools)
|
||||
(gnu packages gnome)
|
||||
(gnu packages base)
|
||||
(gnu packages bash))
|
||||
|
||||
(package
|
||||
(name "svitak-dev-env")
|
||||
(version "0.1")
|
||||
(source #f)
|
||||
(build-system trivial-build-system)
|
||||
(native-search-paths
|
||||
(list (search-path-specification
|
||||
(variable "PATH")
|
||||
(files '("bin")))
|
||||
(search-path-specification
|
||||
(variable "PKG_CONFIG_PATH")
|
||||
(files '("lib/pkgconfig" "share/pkgconfig")))
|
||||
(search-path-specification
|
||||
(variable "LD_LIBRARY_PATH")
|
||||
(files '("lib")))))
|
||||
(native-inputs
|
||||
(list bash-minimal
|
||||
coreutils
|
||||
ghc-9.2
|
||||
cabal-install
|
||||
pkg-config
|
||||
gcc-toolchain
|
||||
gobject-introspection
|
||||
cairo
|
||||
pango
|
||||
gtk+
|
||||
webkitgtk
|
||||
libsoup
|
||||
glib
|
||||
zlib
|
||||
gnu-make
|
||||
binutils))
|
||||
(synopsis "Svitak development environment")
|
||||
(description "Environment for building Svitak with GTK and WebKit.")
|
||||
(home-page "https://example.org")
|
||||
(license license:expat))
|
||||
21
run-svitak.sh
Executable file
21
run-svitak.sh
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
BOOK_PATH=""
|
||||
|
||||
mkdir -p /tmp/guix-dbus
|
||||
echo "00000000000000000000000000000000" > /tmp/guix-dbus/machine-id
|
||||
|
||||
guix shell -C -N --emulate-fhs \
|
||||
--share=$HOME/.cabal=$HOME/.cabal \
|
||||
--share=$PWD=$PWD \
|
||||
--share="$HOME/3-I/books"="$HOME/3-I/books" \
|
||||
--share="$XDG_RUNTIME_DIR"="$XDG_RUNTIME_DIR" \
|
||||
--share="$XDG_RUNTIME_DIR/bus"="$XDG_RUNTIME_DIR/bus" \
|
||||
--share=/tmp/guix-dbus/machine-id=/etc/machine-id \
|
||||
--share=/dev/dri \
|
||||
--share=/sys \
|
||||
--preserve='^WAYLAND_DISPLAY$' \
|
||||
--preserve='^XDG_RUNTIME_DIR$' \
|
||||
--preserve='^DBUS_SESSION_BUS_ADDRESS$' \
|
||||
-D -f guix.scm -- \
|
||||
bash -c "export TEST=2; cabal run svitak -- \"$BOOK_PATH\""
|
||||
Loading…
Reference in a new issue