forked from marko/svitak
fix guix dev setup, add hls to dev env
This commit is contained in:
parent
16cde4bbac
commit
237d653d69
3 changed files with 87 additions and 80 deletions
3
.envrc
Normal file
3
.envrc
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
eval "$(guix shell -f guix.scm --search-paths)"
|
||||||
|
|
||||||
|
unset GHC_PACKAGE_PATH
|
||||||
23
flake.nix
23
flake.nix
|
|
@ -1,23 +0,0 @@
|
||||||
{
|
|
||||||
description = "Nix side-car for Haskell LSP";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { self, nixpkgs }:
|
|
||||||
let
|
|
||||||
system = "x86_64-linux";
|
|
||||||
pkgs = import nixpkgs {
|
|
||||||
inherit system;
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
devShells.${system}.default = pkgs.mkShell {
|
|
||||||
buildInputs = [
|
|
||||||
pkgs.haskell-language-server
|
|
||||||
(pkgs.writeShellScriptBin "hls-nix" "exec haskell-language-server-wrapper \"$@\"")
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
95
guix.scm
95
guix.scm
|
|
@ -1,49 +1,87 @@
|
||||||
(use-modules (guix packages)
|
(use-modules (guix packages)
|
||||||
(guix download)
|
(guix gexp)
|
||||||
|
(guix search-paths)
|
||||||
(guix build-system trivial)
|
(guix build-system trivial)
|
||||||
((guix licenses) #:prefix license:)
|
((guix licenses) #:prefix license:)
|
||||||
|
|
||||||
|
(gnu packages)
|
||||||
|
|
||||||
|
(gnu packages base)
|
||||||
|
(gnu packages bash)
|
||||||
|
(gnu packages build-tools)
|
||||||
|
(gnu packages commencement)
|
||||||
|
(gnu packages compression)
|
||||||
|
(gnu packages glib)
|
||||||
|
(gnu packages gnome)
|
||||||
|
(gnu packages gtk)
|
||||||
|
(gnu packages linux)
|
||||||
|
(gnu packages pkg-config)
|
||||||
|
(gnu packages webkit)
|
||||||
|
|
||||||
(gnu packages haskell)
|
(gnu packages haskell)
|
||||||
(gnu packages haskell-xyz)
|
(gnu packages haskell-xyz)
|
||||||
(gnu packages haskell-apps)
|
(gnu packages haskell-apps)
|
||||||
(gnu packages pkg-config)
|
(gnu packages haskell-web)
|
||||||
(gnu packages commencement)
|
|
||||||
(gnu packages gtk)
|
(abbe packages ghc))
|
||||||
(gnu packages glib)
|
|
||||||
(gnu packages compression)
|
|
||||||
(gnu packages base)
|
|
||||||
(gnu packages linux)
|
|
||||||
(gnu packages webkit)
|
|
||||||
(gnu packages build-tools)
|
|
||||||
(gnu packages gnome)
|
|
||||||
(gnu packages bash)
|
|
||||||
(gnu packages haskell-web))
|
|
||||||
|
|
||||||
(package
|
(package
|
||||||
(name "svitak-dev-env")
|
(name "svitak-dev-env")
|
||||||
(version "0.1")
|
(version "0.1")
|
||||||
(source #f)
|
(source #f)
|
||||||
(build-system trivial-build-system)
|
(build-system trivial-build-system)
|
||||||
|
|
||||||
|
;; Dummy package output. The package itself builds nothing;
|
||||||
|
;; it only exists to pull a full dev environment into a shell/profile.
|
||||||
|
(arguments
|
||||||
|
(list
|
||||||
|
#:builder
|
||||||
|
#~(begin
|
||||||
|
(mkdir #$output)
|
||||||
|
#t)))
|
||||||
|
|
||||||
|
;; These make guix shell compute the right environment variables.
|
||||||
(native-search-paths
|
(native-search-paths
|
||||||
(list (search-path-specification
|
(list
|
||||||
(variable "PATH")
|
|
||||||
(files '("bin")))
|
|
||||||
(search-path-specification
|
(search-path-specification
|
||||||
(variable "PKG_CONFIG_PATH")
|
(variable "PKG_CONFIG_PATH")
|
||||||
(files '("lib/pkgconfig" "share/pkgconfig")))
|
(files '("lib/pkgconfig" "share/pkgconfig")))
|
||||||
|
|
||||||
(search-path-specification
|
(search-path-specification
|
||||||
(variable "GI_TYPELIB_PATH")
|
(variable "GI_TYPELIB_PATH")
|
||||||
(files '("lib/girepository-1.0")))
|
(files '("lib/girepository-1.0")))
|
||||||
|
|
||||||
(search-path-specification
|
(search-path-specification
|
||||||
(variable "LD_LIBRARY_PATH")
|
(variable "XDG_DATA_DIRS")
|
||||||
(files '("lib")))
|
(files '("share")))
|
||||||
|
|
||||||
(search-path-specification
|
(search-path-specification
|
||||||
(variable "LIBRARY_PATH")
|
(variable "LIBRARY_PATH")
|
||||||
(files '("lib")))
|
(files '("lib")))
|
||||||
|
|
||||||
|
(search-path-specification
|
||||||
|
(variable "LD_LIBRARY_PATH")
|
||||||
|
(files '("lib")))
|
||||||
|
|
||||||
(search-path-specification
|
(search-path-specification
|
||||||
(variable "C_INCLUDE_PATH")
|
(variable "C_INCLUDE_PATH")
|
||||||
(files '("include")))))
|
(files '("include")))))
|
||||||
(inputs
|
|
||||||
(list cairo
|
(propagated-inputs
|
||||||
|
(list
|
||||||
|
|
||||||
|
bash-minimal
|
||||||
|
coreutils
|
||||||
|
gcc-toolchain
|
||||||
|
binutils
|
||||||
|
gnu-make
|
||||||
|
pkg-config
|
||||||
|
|
||||||
|
(specification->package "ghc@9.10.2")
|
||||||
|
cabal-install
|
||||||
|
(list haskell-language-server-bin "9.10.2")
|
||||||
|
|
||||||
|
cairo
|
||||||
pango
|
pango
|
||||||
gtk
|
gtk
|
||||||
webkitgtk
|
webkitgtk
|
||||||
|
|
@ -53,22 +91,11 @@
|
||||||
libsoup
|
libsoup
|
||||||
zlib
|
zlib
|
||||||
harfbuzz
|
harfbuzz
|
||||||
gsettings-desktop-schemas))
|
gsettings-desktop-schemas
|
||||||
(native-inputs
|
|
||||||
(list bash-minimal
|
|
||||||
coreutils
|
|
||||||
ghc
|
|
||||||
cabal-install
|
|
||||||
pkg-config
|
|
||||||
gcc-toolchain
|
|
||||||
gobject-introspection
|
gobject-introspection
|
||||||
gnu-make
|
|
||||||
binutils
|
|
||||||
ghc-libffi
|
|
||||||
ghc-gtk2hs-buildtools
|
|
||||||
ghc-http-client-tls
|
|
||||||
adwaita-icon-theme))
|
adwaita-icon-theme))
|
||||||
|
|
||||||
(synopsis "Svitak development environment")
|
(synopsis "Svitak development environment")
|
||||||
(description "Environment for building Svitak with GTK and WebKit.")
|
(description "Development environment for building Svitak with Haskell, GTK, and WebKit.")
|
||||||
(home-page "https://example.org")
|
(home-page "https://example.org")
|
||||||
(license license:expat))
|
(license license:expat))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue