mirror of
https://codeberg.org/mhwombat/nix-book.git
synced 2026-05-13 17:11:13 +08:00
temp
This commit is contained in:
parent
118ee240d7
commit
2d07f3ceeb
4 changed files with 41 additions and 16 deletions
|
|
@ -3,7 +3,7 @@
|
|||
////
|
||||
$ mkdir tempwork
|
||||
$ cd tempwork
|
||||
$ cp Main.hs ../flake.nix .
|
||||
$ cp ../Main.hs ../flake.nix .
|
||||
$ git add Main.hs flake.nix
|
||||
$ nix develop
|
||||
$ git add flake.lock
|
||||
|
|
|
|||
6
source/recipes/devshell/haskell-pkg/tempwork/Main.hs
Normal file
6
source/recipes/devshell/haskell-pkg/tempwork/Main.hs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import Data.List.Extra
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
print $ lower "ABCDE"
|
||||
print $ upper "XYZ"
|
||||
21
source/recipes/devshell/haskell-pkg/tempwork/flake.nix
Normal file
21
source/recipes/devshell/haskell-pkg/tempwork/flake.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, pandoc-columns }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
customGhc = pkgs.haskellPackages.ghcWithPackages (p: with p; [ p.extra ]);
|
||||
in
|
||||
{
|
||||
devShells = rec {
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = [ customGhc ];
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue