Skip to content

Commit

Permalink
flake copied over from puzzld
Browse files Browse the repository at this point in the history
  • Loading branch information
robx committed May 17, 2022
1 parent 0b2c750 commit 8f5e85b
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 0 deletions.
42 changes: 42 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
t = pkgs.lib.trivial;
hl = pkgs.haskell.lib;

name = "puzzld";

project = devTools:
let addBuildTools = (t.flip hl.addBuildTools) devTools;
in pkgs.haskellPackages.developPackage {
root = pkgs.lib.sourceFilesBySuffices ./. [ ".cabal" ".hs" "LICENSE" ];
name = name;
returnShellEnv = !(devTools == [ ]);

modifier = (t.flip t.pipe) [
addBuildTools
hl.dontHaddock
hl.enableStaticLibraries
hl.justStaticExecutables
hl.disableLibraryProfiling
hl.disableExecutableProfiling
];
};

in {
packages.puzzle-draw = project [ ];

defaultPackage = self.packages.${system}.puzzle-draw;

devShell = project (with pkgs.haskellPackages; [
pkgs.haskellPackages.cabal-fmt
pkgs.haskellPackages.cabal-install
]);
});
}

0 comments on commit 8f5e85b

Please sign in to comment.