Skip to content

Commit

Permalink
Update nixpkgs (#257)
Browse files Browse the repository at this point in the history
This allows us to use the binary cache for everything but Agda. This
allows us to use HLS without rebuilding everything (see #255).

There has been a [breaking change to
fsnotify](https://hackage.haskell.org/package/fsnotify-0.4.0.0/changelog),
hence the slight change to the shakefile.
  • Loading branch information
SquidDev authored Sep 12, 2023
1 parent 57da67b commit 71cb456
Show file tree
Hide file tree
Showing 37 changed files with 10 additions and 280 deletions.
2 changes: 0 additions & 2 deletions support/nix/dep/citeproc/default.nix

This file was deleted.

7 changes: 0 additions & 7 deletions support/nix/dep/citeproc/github.json

This file was deleted.

12 changes: 0 additions & 12 deletions support/nix/dep/citeproc/thunk.nix

This file was deleted.

2 changes: 0 additions & 2 deletions support/nix/dep/commonmark-hs/default.nix

This file was deleted.

7 changes: 0 additions & 7 deletions support/nix/dep/commonmark-hs/github.json

This file was deleted.

12 changes: 0 additions & 12 deletions support/nix/dep/commonmark-hs/thunk.nix

This file was deleted.

2 changes: 0 additions & 2 deletions support/nix/dep/doclayout/default.nix

This file was deleted.

7 changes: 0 additions & 7 deletions support/nix/dep/doclayout/github.json

This file was deleted.

12 changes: 0 additions & 12 deletions support/nix/dep/doclayout/thunk.nix

This file was deleted.

2 changes: 0 additions & 2 deletions support/nix/dep/doctemplates/default.nix

This file was deleted.

7 changes: 0 additions & 7 deletions support/nix/dep/doctemplates/github.json

This file was deleted.

12 changes: 0 additions & 12 deletions support/nix/dep/doctemplates/thunk.nix

This file was deleted.

2 changes: 0 additions & 2 deletions support/nix/dep/gridtables/default.nix

This file was deleted.

7 changes: 0 additions & 7 deletions support/nix/dep/gridtables/github.json

This file was deleted.

12 changes: 0 additions & 12 deletions support/nix/dep/gridtables/thunk.nix

This file was deleted.

2 changes: 0 additions & 2 deletions support/nix/dep/jira-wiki-markup/default.nix

This file was deleted.

7 changes: 0 additions & 7 deletions support/nix/dep/jira-wiki-markup/github.json

This file was deleted.

12 changes: 0 additions & 12 deletions support/nix/dep/jira-wiki-markup/thunk.nix

This file was deleted.

2 changes: 0 additions & 2 deletions support/nix/dep/pandoc-types/default.nix

This file was deleted.

7 changes: 0 additions & 7 deletions support/nix/dep/pandoc-types/github.json

This file was deleted.

12 changes: 0 additions & 12 deletions support/nix/dep/pandoc-types/thunk.nix

This file was deleted.

2 changes: 0 additions & 2 deletions support/nix/dep/pandoc/default.nix

This file was deleted.

7 changes: 0 additions & 7 deletions support/nix/dep/pandoc/github.json

This file was deleted.

12 changes: 0 additions & 12 deletions support/nix/dep/pandoc/thunk.nix

This file was deleted.

2 changes: 0 additions & 2 deletions support/nix/dep/skylighting/default.nix

This file was deleted.

8 changes: 0 additions & 8 deletions support/nix/dep/skylighting/github.json

This file was deleted.

12 changes: 0 additions & 12 deletions support/nix/dep/skylighting/thunk.nix

This file was deleted.

2 changes: 0 additions & 2 deletions support/nix/dep/texmath/default.nix

This file was deleted.

7 changes: 0 additions & 7 deletions support/nix/dep/texmath/github.json

This file was deleted.

12 changes: 0 additions & 12 deletions support/nix/dep/texmath/thunk.nix

This file was deleted.

2 changes: 0 additions & 2 deletions support/nix/dep/wai/default.nix

This file was deleted.

8 changes: 0 additions & 8 deletions support/nix/dep/wai/github.json

This file was deleted.

12 changes: 0 additions & 12 deletions support/nix/dep/wai/thunk.nix

This file was deleted.

42 changes: 1 addition & 41 deletions support/nix/haskell-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,49 +14,9 @@ in
{
# Can't just override all Haskell packages because callCabal2nix
# somehow depends on mime-types
labHaskellPackages = super.haskell.packages.ghc943.override (old: {
labHaskellPackages = super.haskell.packages.ghc946.override (old: {
overrides = self: super: {
Agda = noProfile (noJunk (super.callCabal2nixWithOptions "Agda" (thunkSource ./dep/Agda) "-f optimise-heavily" {}));


# Currently broken (set to 0 so other packages which depend on
# it explode)
hspec-contrib = 0;
hspec-core = 0;

# Depend on hspec for their test suites. Just don't test them
JuicyPixels = noJunk super.JuicyPixels;
doctest = noJunk super.doctest;
shelly = noJunk super.shelly;
hls-graph = noJunk super.hls-graph;

pandoc = noJunk (self.callCabal2nix "pandoc" (thunkSource ./dep/pandoc) {});
pandoc-types = noJunk (self.callCabal2nix "pandoc-types" (thunkSource ./dep/pandoc-types) {});
commonmark = noJunk (self.callCabal2nix "commonmark" ((thunkSource ./dep/commonmark-hs) + "/commonmark") {});
commonmark-extensions = noJunk (self.callCabal2nix "commonmark-extensions" ((thunkSource ./dep/commonmark-hs) + "/commonmark-extensions") {});
commonmark-pandoc = noJunk (self.callCabal2nix "commonmark-pandoc" ((thunkSource ./dep/commonmark-hs) + "/commonmark-pandoc") {});
texmath = noJunk (self.callCabal2nix "texmath" (thunkSource ./dep/texmath) {});
citeproc = noJunk (self.callCabal2nix "citeproc" (thunkSource ./dep/citeproc) {});
doclayout = noJunk (self.callCabal2nix "doclayout" (thunkSource ./dep/doclayout) {});
doctemplates = noJunk (self.callCabal2nix "doctemplates" (thunkSource ./dep/doctemplates) {});
gridtables = noJunk (self.callCabal2nix "gridtables" (thunkSource ./dep/gridtables) {});
jira-wiki-markup = noJunk (self.callCabal2nix "jira-wiki-markup" (thunkSource ./dep/jira-wiki-markup) {});
mime-types = noJunk (self.callCabal2nix "mime-types" ((thunkSource ./dep/wai) + "/mime-types") {});
skylighting = noJunk (pkgs.haskell.lib.overrideCabal
(self.callCabal2nix "skylighting" ((thunkSource ./dep/skylighting) + "/skylighting") {})
{
preConfigure = ''
rm changelog.md
cp ${((thunkSource ./dep/skylighting) + "/changelog.md")} .
${self.skylighting-core}/bin/skylighting-extract ${((thunkSource ./dep/skylighting) + "/skylighting-core/xml")}
'';
});
skylighting-format-ansi = noJunk (self.callCabal2nix "skylighting-format-ansi" ((thunkSource ./dep/skylighting) + "/skylighting-format-ansi") {});
skylighting-format-blaze-html = noJunk (self.callCabal2nix "skylighting-format-blaze-html" ((thunkSource ./dep/skylighting) + "/skylighting-format-blaze-html") {});
skylighting-format-context = noJunk (self.callCabal2nix "skylighting-format-context" ((thunkSource ./dep/skylighting) + "/skylighting-format-context") {});
skylighting-format-latex = noJunk (self.callCabal2nix "skylighting-format-latex" ((thunkSource ./dep/skylighting) + "/skylighting-format-latex") {});
skylighting-core = noJunk
(self.callCabal2nixWithOptions "skylighting-core" ((thunkSource ./dep/skylighting) + "/skylighting-core") "-fexecutable" {});
};
});
}
4 changes: 2 additions & 2 deletions support/nix/nixpkgs.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
args: import (builtins.fetchTarball {
name = "1lab-nixpkgs";
url = "https://github.com/nixos/nixpkgs/archive/cc4bb87f5457ba06af9ae57ee4328a49ce674b1b.tar.gz";
sha256 = "sha256:072q50x5p06qjf0cvz68gcrbkpv94bdl55h71j0rz6bgfhaqmiwy";
url = "https://github.com/nixos/nixpkgs/archive/bf39054f8666a98196671269351e42db7e0db6bc.tar.gz";
sha256 = "sha256:0f9k3c6qjsn2aw5jhyz8pqs5saajgi4wkrbj0yrsp1k0vpx4yqx6";
}) ({
overlays = [ (import ./haskell-packages.nix) ];
} // args)
2 changes: 1 addition & 1 deletion support/shake/1lab-shake.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ executable shake
citeproc,
doctemplates,
extra,
fsnotify >= 0.3 && < 0.4,
fsnotify >= 0.4 && < 0.5,
network-uri,
pandoc,
pandoc-types,
Expand Down
9 changes: 6 additions & 3 deletions support/shake/app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -261,15 +261,18 @@ main = do

-- | Watch config with 10ms (0.01 / 1e-12)
watchConfig :: Watch.WatchConfig
watchConfig = Watch.defaultConfig { Watch.confDebounce = Watch.Debounce 1e-10 }
watchConfig = Watch.defaultConfig

isFile Watch.IsFile = True
isFile Watch.IsDirectory = False

buildMany :: ShakeDatabase -> [Action ()] -> Maybe String -> IO (Bool, [IO ()])
buildMany db wanted cmd = Watch.withManagerConf watchConfig \mgr -> do
(_, clean) <- buildOnce db wanted

toRebuild <- atomically $ newTVar Set.empty
_ <- Watch.watchTree mgr "src" (not . Watch.eventIsDirectory) (logEvent toRebuild)
_ <- Watch.watchTree mgr "support" (not . Watch.eventIsDirectory) (logEvent toRebuild)
_ <- Watch.watchTree mgr "src" (isFile . Watch.eventIsDirectory) (logEvent toRebuild)
_ <- Watch.watchTree mgr "support" (isFile . Watch.eventIsDirectory) (logEvent toRebuild)

root <- Dir.canonicalizePath "."

Expand Down

0 comments on commit 71cb456

Please sign in to comment.