summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2023-08-03 09:44:54 +1000
committerJustin Bedo <cu@cua0.org>2023-08-03 09:44:54 +1000
commitae32b54617ab7bd5d24764d0d85a7a08a9e8d461 (patch)
tree27f1a742df742597acd78caab5abfdba5910b886
parentbe57c3a0f907661fba2ef559529be743dca28ca1 (diff)
add legacy build support
-rw-r--r--default.nix15
-rw-r--r--flake.nix24
2 files changed, 25 insertions, 14 deletions
diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000..5582923
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,15 @@
+{
+ pkgs ?
+ import (builtins.fetchTarball {
+ url = "https://github.com/nixos/nixpkgs/archive/356c6dcdf37cfb4162f534e5dcabadddbfbd6bfa.tar.gz";
+ sha256 = "sha256-JCkJfcZL1qs24L+Fv6OyFW4wTE6+NCg9I8nDf6npP+A=";
+ }) {},
+}: let
+ inherit (pkgs.haskell.lib) dontCheck markUnbroken;
+ hp = pkgs.haskell.packages.ghc928.override {
+ overrides = self: super: rec {
+ cuckoo = markUnbroken (dontCheck super.cuckoo);
+ };
+ };
+in
+ hp.callCabal2nix "dedumi" ./. {}
diff --git a/flake.nix b/flake.nix
index ca94e85..cb7b97c 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,17 +1,13 @@
{
inputs.nixpkgs.url = "github:nixos/nixpkgs";
- outputs = {self, nixpkgs}:
- let
- system = "x86_64-linux";
- pkgs = import nixpkgs {inherit system; config.allowBroken=true;};
- hp = pkgs.haskell.packages.ghc928.override {
- overrides = self: super: rec {
- cuckoo = pkgs.haskell.lib.dontCheck super.cuckoo;
- };
- };
- in
- {
- packages.${system}.default = hp.callCabal2nix "dedumi" ./. {};
- devShells.${system}.default = self.packages.${system}.default.env;
- };
+ outputs = {
+ self,
+ nixpkgs,
+ }: let
+ system = "x86_64-linux";
+ pkgs = import nixpkgs {inherit system;};
+ in {
+ packages.${system}.default = import ./. {inherit pkgs;};
+ devShells.${system}.default = self.packages.${system}.default.env;
+ };
}