Skip to content

Commit 7623954

Browse files
committedJun 9, 2023
switch build to flake
1 parent 650aabf commit 7623954

9 files changed

+135
-257
lines changed
 

‎.gitignore

-2
This file was deleted.

‎flake.lock

+61
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎flake.nix

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
inputs = {
3+
"nixos-23.05".url = "github:NixOS/nixpkgs/nixos-23.05";
4+
flake-utils.url = "github:numtide/flake-utils";
5+
};
6+
outputs = inputs@{ self, ... }:
7+
let packageName = "lazy-async";
8+
in inputs.flake-utils.lib.eachDefaultSystem (system:
9+
let
10+
nixpkgs = {
11+
"nixos-23.05" = import inputs."nixos-23.05" { inherit system; };
12+
};
13+
pkgs = nixpkgs."nixos-23.05";
14+
project = pkgs.haskellPackages.developPackage {
15+
root = ./lazy-async;
16+
name = packageName;
17+
};
18+
inherit (pkgs.lib) fold composeExtensions concatMap attrValues;
19+
20+
combineOverrides = old:
21+
fold composeExtensions (old.overrides or (_: _: { }));
22+
23+
in
24+
{
25+
defaultPackage = self.packages.${system}.${packageName};
26+
27+
packages = {
28+
"${packageName}" = project;
29+
30+
testConfigurations =
31+
let
32+
33+
inherit (pkgs.haskell.lib) dontCheck;
34+
35+
makeTestConfiguration =
36+
let defaultPkgs = pkgs;
37+
in { pkgs ? defaultPkgs, ghcVersion, overrides ? new: old: { } }:
38+
let inherit (pkgs.haskell.lib) dontCheck packageSourceOverrides;
39+
in (pkgs.haskell.packages.${ghcVersion}.override (old: {
40+
overrides = combineOverrides old [
41+
(packageSourceOverrides {
42+
lazy-async = ./lazy-async;
43+
})
44+
overrides
45+
];
46+
47+
})).lazy-async;
48+
49+
in
50+
rec {
51+
ghc-9-0 = makeTestConfiguration {
52+
pkgs = nixpkgs."nixos-23.05";
53+
ghcVersion = "ghc90";
54+
};
55+
ghc-9-2 = makeTestConfiguration {
56+
pkgs = nixpkgs."nixos-23.05";
57+
ghcVersion = "ghc92";
58+
};
59+
ghc-9-4 = makeTestConfiguration {
60+
pkgs = nixpkgs."nixos-23.05";
61+
ghcVersion = "ghc94";
62+
};
63+
all = pkgs.symlinkJoin {
64+
name = packageName;
65+
paths = [ ghc-9-0 ghc-9-2 ghc-9-4 ];
66+
};
67+
};
68+
};
69+
});
70+
}

‎lazy-async/lazy-async.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ common language
4242

4343
common dependencies
4444
build-depends:
45-
, base ^>= 4.14 || ^>= 4.15 || ^>= 4.16 || ^>= 4.17
45+
, base ^>= 4.15 || ^>= 4.16 || ^>= 4.17
4646
, exceptions ^>= 0.10.4
4747
, lifted-async ^>= 0.10.2
4848
, monad-control ^>= 1.0.3

‎nix/data-functor-logistic-0.0.nix

-11
This file was deleted.

‎nix/rank2classes-1.4.6.nix

-21
This file was deleted.

‎nix/sources.json

-26
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.