Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: flake.nix for the project #83

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{ pkgs ? import <nixpkgs> { }, ... }:

let
lib = pkgs.lib;
haskellPkg = pkgName: pkgs.haskellPackages."${pkgName}";

mkDerivation = haskellPkg "mkDerivation";
aeson = haskellPkg "aeson";
ansi-terminal = haskellPkg "ansi-terminal";
ansi-wl-pprint = haskellPkg "ansi-wl-pprint_0_6_9";
async = haskellPkg "async";
base = haskellPkg "base_4_21_0_0";
boxes = haskellPkg "boxes";
bytestring = haskellPkg "bytestring_0_12_2_0";
containers = haskellPkg "containers_0_7";
directory = haskellPkg "directory_1_3_9_0";
filepath = haskellPkg "filepath_1_5_4_0";
formatting = haskellPkg "formatting";
Glob = haskellPkg "Glob";
hspec = haskellPkg "hspec";
hspec-core = haskellPkg "hspec-core";
HUnit = haskellPkg "HUnit";
language-javascript = haskellPkg "language-javascript";
mtl = haskellPkg "mtl_2_3_1";
optparse-applicative = haskellPkg "optparse-applicative";
process = haskellPkg "process_1_6_25_0";
purescript = haskellPkg "purescript";
QuickCheck = haskellPkg "QuickCheck";
safe = haskellPkg "safe";
text = haskellPkg "text_2_1_2";
transformers = haskellPkg "transformers_0_6_1_2";
unordered-containers = haskellPkg "unordered-containers";
utf8-string = haskellPkg "utf8-string";
in mkDerivation rec {
pname = "zephyr";
version = "5.3";
src = ./.;
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
aeson ansi-terminal base boxes containers formatting language-javascript mtl purescript safe text unordered-containers
];
executableHaskellDepends = [
aeson ansi-terminal ansi-wl-pprint async base bytestring containers
directory filepath formatting Glob language-javascript mtl
optparse-applicative purescript text transformers utf8-string
];
testHaskellDepends = [
aeson base containers directory hspec hspec-core HUnit
language-javascript mtl optparse-applicative process purescript
QuickCheck text transformers
];
testToolDepends = [ purescript ];
license = lib.licenses.mpl20;
description = "Zephyr, tree-shaking for the PureScript language";
homepage = "https://github.com/MaybeJustJames/zephyr";
maintainers = with pkgs.lib.maintainers; [ malik ];
hydraPlatforms = lib.platforms.none;
mainProgram = pname;
}
61 changes: 61 additions & 0 deletions flake.lock

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

19 changes: 19 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
description = "Flake utils demo";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system}; in
{
packages = rec {
default = zephyr;
zephyr = import ./default.nix { inherit pkgs; };
};
}
);
}
72 changes: 36 additions & 36 deletions zephyr.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,18 @@ library
, Language.PureScript.DCE.Eval
, Language.PureScript.DCE.Utils
build-depends:
aeson >=2.0.3.0 && <2.1
, ansi-terminal >=0.11 && <0.12
, base >=4.16.2 && <4.17
aeson >=2.1.2.1 && <2.2
, ansi-terminal >=1.0.2 && <1.1
, base >=4.21.0.0 && <4.22
, boxes >=0.1.5 && <0.2
, containers >=0.6.5.1 && <0.7
, containers >=0.7 && <0.8
, formatting
, language-javascript ==0.7.0.0
, mtl >=2.2.2 && <2.3
, purescript >=0.15.4 && <0.16
, safe >=0.3.19 && <0.4
, text >=1.2.5.0 && <1.3
, unordered-containers == 0.2.19.1
, language-javascript ==0.7.1.0
, mtl >=2.3.1 && <2.4
, purescript >=0.15.15 && <0.16
, safe >=0.3.21 && <0.4
, text >=2.1.2 && <2.2
, unordered-containers == 0.2.20
default-language: Haskell2010

executable zephyr
Expand Down Expand Up @@ -106,23 +106,23 @@ executable zephyr
-rtsopts
-with-rtsopts -N2
build-depends:
aeson >=2.0.3.0 && <2.1
aeson >=2.1.2.1 && <2.2
, async
, ansi-terminal >=0.11 && <0.12
, ansi-terminal >=1.0.2 && <1.1
, ansi-wl-pprint >=0.6.9 && <0.7
, base >=4.16.2 && <4.17
, bytestring >=0.11.3.1 && <0.12
, containers >=0.6.5.1 && <0.7
, directory >=1.3.6.2 && <1.4
, filepath >=1.4.2.2 && <1.5
, base >=4.21.0.0 && <4.22
, bytestring >=0.12.2.0 && <0.13
, containers >=0.7 && <0.8
, directory >=1.3.9.0 && <1.4
, filepath >=1.5.4.0 && <1.6
, formatting
, Glob >=0.10.2 && <0.11
, language-javascript ==0.7.0.0
, mtl >=2.2.2 && <2.3
, optparse-applicative >=0.17.0.0 && <0.18
, purescript >=0.15.4 && <0.16
, text >=1.2.5.0 && <1.3
, transformers >=0.5.6.2 && <0.6
, language-javascript ==0.7.1.0
, mtl >=2.3.1 && <2.4
, optparse-applicative >=0.18.1.0 && <0.19
, purescript >=0.15.15 && <0.16
, text >=2.1.2 && <2.2
, transformers >=0.6.1.2 && <0.7
, utf8-string >=1.0.2 && <1.1
, zephyr >=0.5 && <0.6
default-language: Haskell2010
Expand All @@ -147,21 +147,21 @@ test-suite zephyr-test
, Test.Karma
, Test.Utils
build-depends:
aeson >=2.0.3.0 && <2.1
, base >=4.16.2 && <4.17
, containers >=0.6.5.1 && <0.7
, directory >=1.3.6.2 && <1.4
aeson >=2.1.2.1 && <2.2
, base >=4.21.0.0 && <4.22
, containers >=0.7 && <0.8
, directory >=1.3.9.0 && <1.4
, hspec
, hspec-core <2.9.3
, hspec-core
, HUnit
, language-javascript ==0.7.0.0
, mtl >=2.2.2 && <2.3
, optparse-applicative ==0.17.0.0
, process ==1.6.13.1
, purescript >=0.15.4 && <0.16
, QuickCheck >=2.12.1
, text >=1.2.5.0 && <1.3
, transformers >=0.5.6.2 && <0.6
, language-javascript ==0.7.1.0
, mtl >=2.3.1 && <2.4
, optparse-applicative ==0.18.1.0
, process ==1.6.25.0
, purescript >=0.15.15 && <0.16
, QuickCheck >=2.14.3
, text >=2.1.2 && <2.2
, transformers >=0.6.1.2 && <0.7
, zephyr >=0.5 && <0.6
build-tool-depends:
purescript:purs
Expand Down