diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..ab29197 --- /dev/null +++ b/.envrc @@ -0,0 +1,3 @@ +eval "$(guix shell -f guix.scm --search-paths)" + +unset GHC_PACKAGE_PATH diff --git a/flake.nix b/flake.nix deleted file mode 100644 index 5dcdae0..0000000 --- a/flake.nix +++ /dev/null @@ -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 \"$@\"") - ]; - }; - }; -} \ No newline at end of file diff --git a/guix.scm b/guix.scm index 7e4318e..49a6477 100644 --- a/guix.scm +++ b/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))