mirror of
https://github.com/serokell/haskell-with-utf8.git
synced 2024-09-11 06:45:36 +03:00
meta: Use haskell.nix flake lib
This commit is contained in:
parent
e401b2175a
commit
1b6156f286
148
flake.lock
148
flake.lock
@ -66,6 +66,21 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1627913399,
|
||||||
|
"narHash": "sha256-hY8g6H2KFL8ownSiFeMOjwPC8P0ueXpCVEbxgda3pko=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "12c64ca55c1014cdc1b16ed5a804aa8576601ff2",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "flake-compat",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1634851050,
|
"lastModified": 1634851050,
|
||||||
@ -95,6 +110,20 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-utils_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1631561581,
|
||||||
|
"narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "7e5bf3925f6fbdfaf50a2a7ca0be2879c4261d19",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "flake-utils",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ghc-8.6.5-iohk": {
|
"ghc-8.6.5-iohk": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@ -112,6 +141,22 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"gitignore-nix": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1611672876,
|
||||||
|
"narHash": "sha256-qHu3uZ/o9jBHiA3MEKHJ06k7w4heOhA+4HCSIvflRxo=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"rev": "211907489e9f198594c0eb0ca9256a1949c9d412",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"hackage": {
|
"hackage": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@ -182,6 +227,40 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"lowdown-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1632468475,
|
||||||
|
"narHash": "sha256-NNOm9CbdA8cuwbvaBHslGbPTiU6bh1Ao+MpEPx4rSGo=",
|
||||||
|
"owner": "kristapsdz",
|
||||||
|
"repo": "lowdown",
|
||||||
|
"rev": "6bd668af3fd098bdd07a1bedd399564141e275da",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "kristapsdz",
|
||||||
|
"repo": "lowdown",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix": {
|
||||||
|
"inputs": {
|
||||||
|
"lowdown-src": "lowdown-src",
|
||||||
|
"nixpkgs": "nixpkgs_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1633098935,
|
||||||
|
"narHash": "sha256-UtuBczommNLwUNEnfRI7822z4vPA7OoRKsgAZ8zsHQI=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nix",
|
||||||
|
"rev": "4f496150eb4e0012914c11f0a3ff4df2412b1d09",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nix",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nix-tools": {
|
"nix-tools": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@ -200,15 +279,17 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1632176121,
|
"lastModified": 1632495107,
|
||||||
"narHash": "sha256-N2oSOhbW38rbc53R1R8qXC/Xstht1PIsAcTzJfmCpTc=",
|
"narHash": "sha256-4NGE56r+FJGBaCYu3CTH4O83Ys4TrtnEPXrvdwg1TDs=",
|
||||||
"path": "/nix/store/cdlpia48vzmh87l8xhmi2a4ylrd3969a-source",
|
"owner": "serokell",
|
||||||
"rev": "3397f0ede9ea2ded1f8b6fa689dda71a7a67b806",
|
"repo": "nixpkgs",
|
||||||
"type": "path"
|
"rev": "be220b2dc47092c1e739bf6aaf630f29e71fe1c4",
|
||||||
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"owner": "serokell",
|
||||||
"type": "indirect"
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-2003": {
|
"nixpkgs-2003": {
|
||||||
@ -275,6 +356,35 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1632864508,
|
||||||
|
"narHash": "sha256-d127FIvGR41XbVRDPVvozUPQ/uRHbHwvfyKHwEt5xFM=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "82891b5e2c2359d7e58d08849e4c89511ab94234",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"ref": "nixos-21.05-small",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1632495107,
|
||||||
|
"narHash": "sha256-4NGE56r+FJGBaCYu3CTH4O83Ys4TrtnEPXrvdwg1TDs=",
|
||||||
|
"owner": "serokell",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "be220b2dc47092c1e739bf6aaf630f29e71fe1c4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
"old-ghc-nix": {
|
"old-ghc-nix": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@ -298,9 +408,33 @@
|
|||||||
"hackage": "hackage",
|
"hackage": "hackage",
|
||||||
"haskell-nix": "haskell-nix",
|
"haskell-nix": "haskell-nix",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
|
"serokell-nix": "serokell-nix",
|
||||||
"stackage": "stackage"
|
"stackage": "stackage"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"serokell-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"flake-utils": "flake-utils_3",
|
||||||
|
"gitignore-nix": "gitignore-nix",
|
||||||
|
"nix": "nix",
|
||||||
|
"nixpkgs": "nixpkgs_3"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1635980912,
|
||||||
|
"narHash": "sha256-NcakB9y37eBr6p2sJcl7Fdt1snLrYBRWvx+gWw4cNVw=",
|
||||||
|
"owner": "serokell",
|
||||||
|
"repo": "serokell.nix",
|
||||||
|
"rev": "949eeebdbb055463c8de214766219e69a48b94b9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "serokell",
|
||||||
|
"ref": "kirelagin/lib.haskell.makeFlake",
|
||||||
|
"repo": "serokell.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"stackage": {
|
"stackage": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
42
flake.nix
42
flake.nix
@ -1,4 +1,4 @@
|
|||||||
# SPDX-FileCopyrightText: 2020 Serokell <https://serokell.io/>
|
# SPDX-FileCopyrightText: 2021 Serokell <https://serokell.io/>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: MPL-2.0
|
# SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
@ -10,6 +10,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
|
serokell-nix.url = "github:serokell/serokell.nix/kirelagin/lib.haskell.makeFlake";
|
||||||
|
nixpkgs.url = "github:serokell/nixpkgs";
|
||||||
haskell-nix = {
|
haskell-nix = {
|
||||||
inputs.hackage.follows = "hackage";
|
inputs.hackage.follows = "hackage";
|
||||||
inputs.stackage.follows = "stackage";
|
inputs.stackage.follows = "stackage";
|
||||||
@ -18,37 +20,19 @@
|
|||||||
stackage.flake = false;
|
stackage.flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils, haskell-nix, hackage, stackage }:
|
outputs = { self, nixpkgs, flake-utils, serokell-nix, haskell-nix, hackage, stackage }:
|
||||||
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
|
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
|
||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system}.extend haskell-nix.overlay;
|
pkgs = nixpkgs.legacyPackages.${system}.extend haskell-nix.overlay;
|
||||||
inherit (pkgs) lib;
|
|
||||||
|
|
||||||
src = ./.;
|
flake =
|
||||||
project = args: pkgs.haskell-nix.stackProject ({ inherit src; } // args);
|
serokell-nix.lib.haskell.makeFlake pkgs.haskell-nix pkgs.haskell-nix.stackProject {
|
||||||
with-utf8 = (project {}).with-utf8;
|
src = ./.;
|
||||||
check = args: (project args).with-utf8.checks.with-utf8-test;
|
ghcVersions = [ "884" "8107" "901" ];
|
||||||
in rec {
|
};
|
||||||
packages = {
|
in flake // {
|
||||||
with-utf8 = with-utf8.components.library;
|
defaultPackage = flake.packages."with-utf8:lib:with-utf8";
|
||||||
};
|
defaultApp = flake.apps."with-utf8:exe:utf8-troubleshoot";
|
||||||
defaultPackage = packages.with-utf8;
|
}
|
||||||
|
|
||||||
checks =
|
|
||||||
let
|
|
||||||
mkGhcCheck = ghcVersion: {
|
|
||||||
name = "test-ghc${ghcVersion}";
|
|
||||||
value = check { ghc = pkgs.haskell-nix.compiler."ghc${ghcVersion}"; };
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
test = with-utf8.checks.with-utf8-test;
|
|
||||||
} // lib.listToAttrs (map mkGhcCheck [ "884" "8107" "901" ]);
|
|
||||||
|
|
||||||
apps.utf8-troubleshoot = {
|
|
||||||
type = "app";
|
|
||||||
program = "${with-utf8.components.exes.utf8-troubleshoot}/bin/utf8-troubleshoot";
|
|
||||||
};
|
|
||||||
defaultApp = apps.utf8-troubleshoot;
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user