Merge pull request #121627 from NixOS/haskell-updates
This commit is contained in:
@@ -1,35 +1,37 @@
|
||||
{ lib, stdenv, fetchFromGitHub, jshon, electron_3
|
||||
{ lib, stdenvNoCC, fetchFromGitHub, jshon, electron_10
|
||||
, runtimeShell, hyper-haskell-server, extra-packages ? [] }:
|
||||
|
||||
let
|
||||
binPath = lib.makeBinPath ([ hyper-haskell-server ] ++ extra-packages);
|
||||
electron = electron_3;
|
||||
in stdenv.mkDerivation rec {
|
||||
electron = electron_10;
|
||||
in stdenvNoCC.mkDerivation rec {
|
||||
pname = "hyper-haskell";
|
||||
version = "0.1.0.2";
|
||||
version = "0.2.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "HeinrichApfelmus";
|
||||
repo = "hyper-haskell";
|
||||
rev = "v${version}";
|
||||
sha256 = "1k38h7qx12z7463z8466pji0nwfkp4qkg7q83kns2mzmwmw5jnmb";
|
||||
sha256 = "1nmkry4wh6a2dy98fcs81mq2p7zhxp1k0f4m3szr6fm3j1zwrd43";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = extra-packages;
|
||||
|
||||
buildCommand = ''
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/hyper-haskell/worksheets $out/share/applications $out/share/icons/hicolor/scalable/apps $out/share/mime/packages
|
||||
|
||||
# Electron app
|
||||
cp -R $src/app $out
|
||||
cp -R app $out
|
||||
|
||||
# Desktop Launcher
|
||||
cp $src/resources/hyper-haskell.desktop $out/share/applications/hyper-haskell.desktop
|
||||
cp $src/resources/icons/icon.svg $out/share/icons/hicolor/scalable/apps/hyper-haskell.svg
|
||||
cp $src/resources/shared-mime-info.xml $out/share/mime/packages/hyper-haskell.xml
|
||||
cp resources/hyper-haskell.desktop $out/share/applications/hyper-haskell.desktop
|
||||
cp resources/icons/icon.svg $out/share/icons/hicolor/scalable/apps/hyper-haskell.svg
|
||||
cp resources/shared-mime-info.xml $out/share/mime/packages/hyper-haskell.xml
|
||||
|
||||
# install example worksheets with backend set to nix
|
||||
for worksheet in "$src/worksheets/"*.hhs; do
|
||||
for worksheet in "worksheets/"*.hhs; do
|
||||
${jshon}/bin/jshon -e settings -s nix -i packageTool -p < $worksheet > $out/share/hyper-haskell/worksheets/`basename $worksheet`
|
||||
done
|
||||
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
let
|
||||
ihaskellEnv = ghcWithPackages (self: [
|
||||
self.ihaskell
|
||||
(haskell.lib.doJailbreak self.ihaskell-blaze)
|
||||
(haskell.lib.doJailbreak self.ihaskell-diagrams)
|
||||
(haskell.lib.doJailbreak self.ihaskell-display)
|
||||
self.ihaskell-blaze
|
||||
self.ihaskell-diagrams
|
||||
] ++ packages self);
|
||||
ihaskellSh = writeScriptBin "ihaskell-notebook" ''
|
||||
#! ${stdenv.shell}
|
||||
|
||||
@@ -1,37 +1,38 @@
|
||||
# This has been automatically generated by the script
|
||||
# ./update.sh. This should not be changed by hand.
|
||||
{ mkDerivation, aeson, aeson-pretty, ansi-terminal, async-pool
|
||||
, base, bower-json, bytestring, Cabal, containers, cryptonite
|
||||
, dhall, directory, either, extra, fetchgit, file-embed, filepath
|
||||
, foldl, fsnotify, generic-lens, Glob, hpack, hspec, hspec-discover
|
||||
, base, bower-json, bytestring, containers, cryptonite, dhall
|
||||
, directory, either, extra, fetchgit, file-embed, filepath, foldl
|
||||
, fsnotify, generic-lens, Glob, hspec, hspec-discover
|
||||
, hspec-megaparsec, http-client, http-conduit, http-types
|
||||
, lens-family-core, lib, megaparsec, mtl, network-uri, open-browser
|
||||
, optparse-applicative, prettyprinter, process, QuickCheck, retry
|
||||
, rio, rio-orphans, safe, semver-range, stm, stringsearch
|
||||
, tar, template-haskell, temporary, text, time, transformers
|
||||
, turtle, unliftio, unordered-containers, utf8-string, versions
|
||||
, with-utf8, zlib
|
||||
, rio, rio-orphans, safe, semver-range, stm, stringsearch, tar
|
||||
, template-haskell, temporary, text, time, transformers, turtle
|
||||
, unliftio, unordered-containers, utf8-string, versions, with-utf8
|
||||
, zlib
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "spago";
|
||||
version = "0.20.1";
|
||||
version = "0.20.2";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/purescript/spago.git";
|
||||
sha256 = "1j2yi6zz9m0k0298wllin39h244v8b2rx87yxxgdbjg77kn96vxg";
|
||||
rev = "41ad739614f4f2c2356ac921308f9475a5a918f4";
|
||||
sha256 = "11jh3bszvl8zfi4xcabpx43jply28dxdywd6fadxspaa05jdxxn2";
|
||||
rev = "0f38c9153e46f30e9d87963e181f5c1a595f4b64";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
aeson aeson-pretty ansi-terminal async-pool base bower-json
|
||||
bytestring Cabal containers cryptonite dhall directory either
|
||||
file-embed filepath foldl fsnotify generic-lens Glob http-client
|
||||
http-conduit http-types lens-family-core megaparsec mtl network-uri
|
||||
open-browser optparse-applicative prettyprinter process retry rio
|
||||
rio-orphans safe semver-range stm stringsearch tar template-haskell
|
||||
temporary text time transformers turtle unliftio
|
||||
unordered-containers utf8-string versions with-utf8 zlib
|
||||
bytestring containers cryptonite dhall directory either file-embed
|
||||
filepath foldl fsnotify generic-lens Glob http-client http-conduit
|
||||
http-types lens-family-core megaparsec mtl network-uri open-browser
|
||||
optparse-applicative prettyprinter process retry rio rio-orphans
|
||||
safe semver-range stm stringsearch tar template-haskell temporary
|
||||
text time transformers turtle unliftio unordered-containers
|
||||
utf8-string versions with-utf8 zlib
|
||||
];
|
||||
libraryToolDepends = [ hpack ];
|
||||
executableHaskellDepends = [
|
||||
ansi-terminal base text turtle with-utf8
|
||||
];
|
||||
@@ -40,7 +41,6 @@ mkDerivation {
|
||||
process QuickCheck temporary text turtle versions
|
||||
];
|
||||
testToolDepends = [ hspec-discover ];
|
||||
prePatch = "hpack";
|
||||
homepage = "https://github.com/purescript/spago#readme";
|
||||
license = lib.licenses.bsd3;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p cabal2nix curl jq
|
||||
#!nix-shell -i bash -p cabal2nix curl jq haskellPackages.cabal2nix-unstable -I nixpkgs=.
|
||||
#
|
||||
# This script will update the spago derivation to the latest version using
|
||||
# cabal2nix.
|
||||
@@ -25,7 +25,10 @@ new_version=$(curl --silent "https://api.github.com/repos/purescript/spago/relea
|
||||
echo "Updating spago from old version $old_version to new version $new_version."
|
||||
echo "Running cabal2nix and outputting to ${spago_derivation_file}..."
|
||||
|
||||
cabal2nix --revision "$new_version" "https://github.com/purescript/spago.git" > "$spago_derivation_file"
|
||||
echo "# This has been automatically generated by the script" > "$spago_derivation_file"
|
||||
echo "# ./update.sh. This should not be changed by hand." >> "$spago_derivation_file"
|
||||
|
||||
cabal2nix --revision "$new_version" "https://github.com/purescript/spago.git" >> "$spago_derivation_file"
|
||||
|
||||
# TODO: This should ideally also automatically update the docsSearchVersion
|
||||
# from pkgs/development/haskell/configuration-nix.nix.
|
||||
|
||||
Reference in New Issue
Block a user