.files/nix/devShells/flora.nix
Léana 江 8cc6d2b71c
remove niv residue
```fish
for d in {.,**/*}
    if [ ! -d $d ]; continue; end

    set from ./nix/sources.nix
    set to   ./npins

    set from (realpath -s $from --relative-to $d)
    set to   (realpath -s $to   --relative-to $d)

    echo "($d, $from, $to)"

    for f in $d/*
        if [ ! -f $f ]; continue; end
        sed -i "s=$from=$to=" $f
    end
end
```
2025-07-03 08:39:28 +02:00

59 lines
1.3 KiB
Nix

#
# This is the non flake shell that just gets the basics of flora so I can have hls support outside of docker
#
let
sources = import ../../npins;
in
{pkgs ? import sources.pin-florashell {}}:
pkgs.mkShell (let
libs = with pkgs; [
zlib
libpq
libsodium
];
hlib = pkgs.haskell.lib;
callHackage = {
name,
version,
}: let
pkg = pkgs.haskell.packages.ghc910.callHackage name version {};
in
hlib.dontCheck (hlib.doJailbreak pkg);
in {
name = "flora";
packages = with pkgs; let
haskellPackages = haskell.packages.ghc910;
in
# These don't build directly and need to be pinned
map callHackage [
{
name = "fourmolu";
version = "0.17.0.0";
}
{
name = "postgresql-migration";
version = "0.2.1.8";
}
]
++ [
haskellPackages.ghcid
haskellPackages.cabal-fmt
haskellPackages.cabal-install
haskellPackages.ghc
haskellPackages.haskell-language-server
postgresql_14
postgresqlTestHook
yarn
pkg-config
esbuild
changelog-d
]
++ libs;
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath libs;
})