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 \"$@\"")
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
143
guix.scm
143
guix.scm
|
|
@ -1,74 +1,101 @@
|
|||
(use-modules (guix packages)
|
||||
(guix download)
|
||||
(guix gexp)
|
||||
(guix search-paths)
|
||||
(guix build-system trivial)
|
||||
((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-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 bash)
|
||||
(gnu packages haskell-web))
|
||||
(gnu packages haskell-web)
|
||||
|
||||
(abbe packages ghc))
|
||||
|
||||
(package
|
||||
(name "svitak-dev-env")
|
||||
(version "0.1")
|
||||
(source #f)
|
||||
(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
|
||||
(list (search-path-specification
|
||||
(variable "PATH")
|
||||
(files '("bin")))
|
||||
(search-path-specification
|
||||
(variable "PKG_CONFIG_PATH")
|
||||
(files '("lib/pkgconfig" "share/pkgconfig")))
|
||||
(search-path-specification
|
||||
(variable "GI_TYPELIB_PATH")
|
||||
(files '("lib/girepository-1.0")))
|
||||
(search-path-specification
|
||||
(variable "LD_LIBRARY_PATH")
|
||||
(files '("lib")))
|
||||
(search-path-specification
|
||||
(variable "LIBRARY_PATH")
|
||||
(files '("lib")))
|
||||
(search-path-specification
|
||||
(variable "C_INCLUDE_PATH")
|
||||
(files '("include")))))
|
||||
(inputs
|
||||
(list cairo
|
||||
pango
|
||||
gtk
|
||||
webkitgtk
|
||||
at-spi2-core
|
||||
gdk-pixbuf
|
||||
glib
|
||||
libsoup
|
||||
zlib
|
||||
harfbuzz
|
||||
gsettings-desktop-schemas))
|
||||
(native-inputs
|
||||
(list bash-minimal
|
||||
coreutils
|
||||
ghc
|
||||
cabal-install
|
||||
pkg-config
|
||||
gcc-toolchain
|
||||
gobject-introspection
|
||||
gnu-make
|
||||
binutils
|
||||
ghc-libffi
|
||||
ghc-gtk2hs-buildtools
|
||||
ghc-http-client-tls
|
||||
adwaita-icon-theme))
|
||||
(list
|
||||
(search-path-specification
|
||||
(variable "PKG_CONFIG_PATH")
|
||||
(files '("lib/pkgconfig" "share/pkgconfig")))
|
||||
|
||||
(search-path-specification
|
||||
(variable "GI_TYPELIB_PATH")
|
||||
(files '("lib/girepository-1.0")))
|
||||
|
||||
(search-path-specification
|
||||
(variable "XDG_DATA_DIRS")
|
||||
(files '("share")))
|
||||
|
||||
(search-path-specification
|
||||
(variable "LIBRARY_PATH")
|
||||
(files '("lib")))
|
||||
|
||||
(search-path-specification
|
||||
(variable "LD_LIBRARY_PATH")
|
||||
(files '("lib")))
|
||||
|
||||
(search-path-specification
|
||||
(variable "C_INCLUDE_PATH")
|
||||
(files '("include")))))
|
||||
|
||||
(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
|
||||
gtk
|
||||
webkitgtk
|
||||
at-spi2-core
|
||||
gdk-pixbuf
|
||||
glib
|
||||
libsoup
|
||||
zlib
|
||||
harfbuzz
|
||||
gsettings-desktop-schemas
|
||||
gobject-introspection
|
||||
adwaita-icon-theme))
|
||||
|
||||
(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")
|
||||
(license license:expat))
|
||||
|
|
|
|||
Loading…
Reference in a new issue