mirror of
https://github.com/simplex-chat/haskell.nix.git
synced 2026-06-03 09:17:32 +00:00
09526c8555
* Spelling and typo fixes in doc and code comments * Trailing whitespace or whitespace only truncation * readTheDocs formatting corrections
84 lines
3.2 KiB
Nix
84 lines
3.2 KiB
Nix
let
|
|
buildDepError = pkg:
|
|
builtins.throw ''
|
|
The Haskell package set does not contain the package: ${pkg} (build dependency).
|
|
|
|
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
|
|
'';
|
|
sysDepError = pkg:
|
|
builtins.throw ''
|
|
The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
|
|
|
|
You may need to augment the system package mapping in haskell.nix so that it can be found.
|
|
'';
|
|
pkgConfDepError = pkg:
|
|
builtins.throw ''
|
|
The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
|
|
|
|
You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
|
|
'';
|
|
exeDepError = pkg:
|
|
builtins.throw ''
|
|
The local executable components do not include the component: ${pkg} (executable dependency).
|
|
'';
|
|
legacyExeDepError = pkg:
|
|
builtins.throw ''
|
|
The Haskell package set does not contain the package: ${pkg} (executable dependency).
|
|
|
|
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
|
|
'';
|
|
buildToolDepError = pkg:
|
|
builtins.throw ''
|
|
Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
|
|
|
|
If this is a system dependency:
|
|
You may need to augment the system package mapping in haskell.nix so that it can be found.
|
|
|
|
If this is a Haskell dependency:
|
|
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
|
|
'';
|
|
in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
|
|
({
|
|
flags = {};
|
|
package = {
|
|
specVersion = "0";
|
|
identifier = { name = "stack-simple"; version = "0.1.0.0"; };
|
|
license = "BSD-3-Clause";
|
|
copyright = "2019 Author name here";
|
|
maintainer = "example@example.com";
|
|
author = "Author name here";
|
|
homepage = "https://github.com/githubuser/stack-simple#readme";
|
|
url = "";
|
|
synopsis = "";
|
|
description = "Please see the README on GitHub at <https://github.com/githubuser/stack-simple#readme>";
|
|
buildType = "Simple";
|
|
isLocal = true;
|
|
};
|
|
components = {
|
|
"library" = {
|
|
depends = [ (hsPkgs."base" or (buildDepError "base")) ];
|
|
buildable = true;
|
|
};
|
|
exes = {
|
|
"stack-simple-exe" = {
|
|
depends = [
|
|
(hsPkgs."base" or (buildDepError "base"))
|
|
(hsPkgs."stack-simple" or (buildDepError "stack-simple"))
|
|
];
|
|
buildable = true;
|
|
};
|
|
};
|
|
tests = {
|
|
"stack-simple-test" = {
|
|
depends = [
|
|
(hsPkgs."base" or (buildDepError "base"))
|
|
(hsPkgs."stack-simple" or (buildDepError "stack-simple"))
|
|
];
|
|
buildable = true;
|
|
};
|
|
};
|
|
};
|
|
} // rec { src = (pkgs.lib).mkDefault ./.; }) // {
|
|
cabal-generator = "hpack";
|
|
}
|