Skip to content

Commit

Permalink
Initial commit of haskell.nix.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmjio committed Jul 18, 2021
1 parent 3395055 commit fb378d9
Show file tree
Hide file tree
Showing 12 changed files with 320 additions and 328 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ dist
*.o
*.hi
*.jsexe
/TAGS
75 changes: 21 additions & 54 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,58 +1,25 @@
{ haddock ? true
, tests ? false
, examples ? false
, ios ? false
, overlays ? []
, system ? builtins.currentSystem
, crossSystem ? null
, crossOverlays ? []
, allowBroken ? false
, allowUnfree ? true
}:
let
options =
{ inherit
haddock
tests
examples
ios
overlays
system
crossSystem
crossOverlays
allowBroken
allowUnfree;
sources = import ./nix/sources.nix {};
haskellNix = import sources.haskellNix {};
args = haskellNix.nixpkgsArgs // { config.allowUnfree = true; };
pkgs = import haskellNix.sources.nixpkgs-unstable args;
miso = pkgs.haskell-nix.project {
src = pkgs.haskell-nix.haskellLib.cleanGit {
name = "miso";
src = ./.;
};
pkgs = import ./nix options;
armPkgs =
with pkgs; with pkgs.lib;
optionalAttrs (options.ios && stdenv.isDarwin)
{ miso-arm = pkgsCross.iphone64.haskell.packages.integer-simple.ghc865.miso; };
release =
with pkgs.haskell.packages.ghc865;
with pkgs.haskell.lib;
sdistTarball (buildStrictly miso);
release-examples =
with pkgs.haskell.packages.ghc865;
with pkgs.haskell.lib;
sdistTarball (buildStrictly miso-examples-jsaddle);
examplePkgs = with pkgs; with pkgs.lib;
let
examplePkgs = optionalAttrs options.examples {
inherit (haskell.packages.ghc865) miso-examples-jsaddle;
inherit (haskell.packages.ghcjs86) miso-examples;
inherit s3;
};
in
examplePkgs //
optionalAttrs (stdenv.isDarwin && options.examples && options.ios)
{ inherit (pkgsCross.iphone64.haskell.packages.integer-simple.ghc865) miso-examples-arm;
};
compiler-nix-name = "ghc8105";
};
examples = pkgs.haskell-nix.project {
src = pkgs.haskell-nix.haskellLib.cleanGit {
name = "miso-examples";
src = ./examples;
};
compiler-nix-name = "ghc8105";
};
in
{
inherit pkgs;
miso-ghcjs = pkgs.haskell.packages.ghcjs86.miso;
miso-ghc = pkgs.haskell.packages.ghc865.miso;
inherit (pkgs.haskell.packages.ghc865) miso-jsaddle;
inherit release release-examples;
} // examplePkgs // armPkgs
miso = miso.projectCross.ghcjs.hsPkgs.miso.components.library;
}


8 changes: 2 additions & 6 deletions miso.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ copyright: Copyright (c) 2017-2020 David M. Johnson
bug-reports: https://github.com/dmjio/miso/issues
build-type: Simple
extra-source-files: README.md
cabal-version: >=1.22
cabal-version: 1.22
synopsis: A tasty Haskell front-end framework
description:
Miso is a small, production-ready, "isomorphic" Haskell front-end framework featuring a virtual-dom, recursive diffing / patching algorithm, event delegation, event batching, SVG, Server-sent events, Websockets, type-safe servant-style routing and an extensible Subscription-based subsystem. Inspired by Elm, Redux and Bobril. Miso is pure by default, but side effects (like XHR) can be introduced into the system via the Effect data type. Miso makes heavy use of the GHCJS FFI and therefore has minimal dependencies.
Expand All @@ -20,7 +20,7 @@ extra-source-files:

flag tests
default:
False
True
description:
Builds Miso's tests

Expand Down Expand Up @@ -181,8 +181,6 @@ library
jsbits/delegate.js
jsbits/isomorphic.js
jsbits/util.js
hs-source-dirs:
frontend-src
build-depends:
containers,
scientific,
Expand All @@ -192,8 +190,6 @@ library
else
build-depends:
vector
hs-source-dirs:
backend-src
if impl(ghcjs)
hs-source-dirs:
ghcjs-src
Expand Down
15 changes: 0 additions & 15 deletions nix/default.nix

This file was deleted.

28 changes: 0 additions & 28 deletions nix/haskell/packages/ghc865/default.nix

This file was deleted.

43 changes: 0 additions & 43 deletions nix/haskell/packages/ghcARM/default.nix

This file was deleted.

46 changes: 0 additions & 46 deletions nix/haskell/packages/ghcjs/default.nix

This file was deleted.

67 changes: 0 additions & 67 deletions nix/haskell/packages/source.nix

This file was deleted.

4 changes: 0 additions & 4 deletions nix/nixpkgs.json

This file was deleted.

65 changes: 0 additions & 65 deletions nix/overlay.nix

This file was deleted.

0 comments on commit fb378d9

Please sign in to comment.