Compare commits
2 Commits
9a911ab42e
...
58be8fc605
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58be8fc605 | ||
|
|
580651eb55 |
19
elm/flake.nix
Normal file
19
elm/flake.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
description = "A very basic Haskell flake";
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, ...}:
|
||||||
|
let
|
||||||
|
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
||||||
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
|
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
||||||
|
in
|
||||||
|
{
|
||||||
|
devShells = forAllSystems (system: {
|
||||||
|
default = pkgs.${system}.callPackage ./shell.nix {};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
18
elm/shell.nix
Normal file
18
elm/shell.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
{ pkgs ? import <nixpkgs> {}}:
|
||||||
|
|
||||||
|
pkgs.mkShell rec {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
caddy
|
||||||
|
elmPackages.elm
|
||||||
|
elmPackages.elm-format
|
||||||
|
elmPackages.elm-optimize-level-2
|
||||||
|
elmPackages.elm-review
|
||||||
|
elmPackages.elm-test
|
||||||
|
nodejs_18
|
||||||
|
shellcheck
|
||||||
|
]
|
||||||
|
;
|
||||||
|
shellHook = ''
|
||||||
|
'';
|
||||||
|
}
|
||||||
33
haskell/flake.nix
Normal file
33
haskell/flake.nix
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
description = "A very basic Haskell flake";
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, ...}:
|
||||||
|
let
|
||||||
|
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
||||||
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
|
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
||||||
|
stack-wrapped = pkgs.symlinkJoin {
|
||||||
|
name = "stack"; # will be available as the usual `stack` in terminal
|
||||||
|
paths = [ pkgs.stack ];
|
||||||
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
|
postBuild = ''
|
||||||
|
wrapProgram $out/bin/stack \
|
||||||
|
--add-flags "\
|
||||||
|
--no-nix \
|
||||||
|
--system-ghc \
|
||||||
|
--no-install-ghc \
|
||||||
|
"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
devShells = forAllSystems (system: {
|
||||||
|
default = pkgs.${system}.callPackage ./shell.nix {};
|
||||||
|
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath self.default.buildInputs;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
13
haskell/shell.nix
Normal file
13
haskell/shell.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
{ pkgs ? import <nixpkgs> {}}:
|
||||||
|
|
||||||
|
pkgs.mkShell rec {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
haskell.compiler.ghc96
|
||||||
|
haskellPackages.cabal-install
|
||||||
|
haskellPackages.stack
|
||||||
|
]
|
||||||
|
;
|
||||||
|
shellHook = ''
|
||||||
|
'';
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user