-
-
Save asheshambasta/ac47853b8b0ac4af0f7a2c8bcf3b20cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
# The following lists specify which overrides need to be applied for which | |
# packages. | |
# Create a list per override, and add the names of packages in it as strings | |
# (using quotes). Do not use the derivations, but the package names. | |
# The overrides are applied using `makeOverrides` below. | |
# Disable tests for these packages | |
dontCheckPackages = [ | |
"motion-detect-camera" | |
"vinyl" | |
"postgresql-simple" | |
"opaleye-trans" | |
"composite-opaleye" | |
]; | |
# Jailbreak these packages | |
doJailbreakPackages = [ "opaleye-trans" "hpio" ]; | |
# Disable haddocks for these packages | |
dontHaddockPackages = | |
[ "motion-detect-camera" "opaleye-trans" "composite-opaleye" ]; | |
# Unmark these packages as broken | |
unmarkBrokenPackages = [ | |
# amazonka is marked as broken (19.09 - 07.01.2020) | |
"amazonka" | |
"amazonka-core" | |
"amazonka-s3" | |
"amazonka-sns" | |
"amazonka-sqs" | |
"amazonka-test" | |
"composite-opaleye" | |
"composite-base" | |
"vinyl" | |
"opaleye-trans" | |
"phone-numbers" | |
"hpio" | |
]; | |
# This function creates overrides | |
makeOverrides = function: names: self: super: | |
let | |
toPackage = name: { | |
inherit name; | |
value = function super.${name}; | |
}; | |
in builtins.listToAttrs (map toPackage names); | |
# servantOverlays = (import ./nix/servant2.nix oldPkgs).overlays; | |
# Override config for nixpkgs | |
rootOverlays = [ | |
( # Packages with non-standard versions | |
self: super: | |
let | |
composeExtensionsList = super.lib.fold super.lib.composeExtensions (_: _: { }); | |
mainPkgs = _: _: rec { | |
# Call the derivation for this project | |
motion-detect-camera = | |
super.callCabal2nix "motion-detect-camera" ./. { }; | |
# Call a custom derivation for a dependency | |
# For example: | |
# - use other version than that in nixpkgs | |
# - use a specific git commit | |
# - use a fork | |
postgresql-simple = | |
super.callHackage "postgresql-simple" "0.5.4.0" { }; | |
}; | |
# More exotic overrides go here | |
manualOverrides = { | |
# phone-numbers = haskellPackagesOld.phone-numbers.override { | |
# phonenumber = pkgs.libphonenumber; | |
# }; | |
}; | |
# apply the overrides | |
in super.haskellPackages.override { | |
overrides = with super.haskell.lib; | |
composeExtensionsList [ | |
mainPkgs | |
(makeOverrides dontCheck dontCheckPackages) | |
(makeOverrides doJailbreak doJailbreakPackages) | |
(makeOverrides dontHaddock dontHaddockPackages) | |
(makeOverrides unmarkBroken unmarkBrokenPackages) | |
manualOverrides | |
]; | |
}) | |
]; | |
# import nixpkgs | |
channel = "nixos-19.09"; | |
pkg-src = builtins.fetchTarball | |
("http://nixos.org/channels/${channel}/nixexprs.tar.xz"); | |
oldPkgs = import pkg-src {}; | |
pkgs = import pkg-src { | |
overlays = # servantOverlays ++ | |
rootOverlays; | |
}; | |
in { | |
motion-detect-camera = pkgs.haskellPackages.motion-detect-camera; | |
inherit pkgs; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
╰─$ nix-shell --run 'cabal repl' --show-trace 1 ↵ | |
error: while evaluating the attribute 'motion-detect-camera' at /home/ashesh/code/homebot/rpi/motion-detect-camera/release.nix:106:3: | |
while evaluating anonymous function at /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/pkgs/top-level/impure.nix:15:1, called from /home/ashesh/code/homebot/rpi/motion-detect-camera/release.nix:100:10: | |
while evaluating anonymous function at /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/pkgs/top-level/default.nix:20:1, called from /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/pkgs/top-level/impure.nix:84:1: | |
while evaluating anonymous function at /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/pkgs/stdenv/booter.nix:42:1, called from /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/pkgs/top-level/default.nix:108:10: | |
while evaluating 'dfold' at /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/pkgs/stdenv/booter.nix:60:27, called from /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/pkgs/stdenv/booter.nix:136:4: | |
while evaluating 'go' at /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/pkgs/stdenv/booter.nix:63:18, called from /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/pkgs/stdenv/booter.nix:72:13: | |
while evaluating 'folder' at /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/pkgs/stdenv/booter.nix:89:33, called from /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/pkgs/stdenv/booter.nix:68:18: | |
while evaluating 'allPackages' at /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/pkgs/top-level/default.nix:98:17, called from /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/pkgs/stdenv/booter.nix:101:12: | |
while evaluating anonymous function at /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/pkgs/top-level/stage.nix:12:1, called from /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/pkgs/top-level/default.nix:98:26: | |
while evaluating 'fix' at /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/lib/fixed-points.nix:19:9, called from /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/pkgs/top-level/stage.nix:248:3: | |
while evaluating 'extends' at /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/lib/fixed-points.nix:69:24, called from /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/lib/fixed-points.nix:19:20: | |
while evaluating 'extends' at /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/lib/fixed-points.nix:69:24, called from /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/lib/fixed-points.nix:69:42: | |
while evaluating anonymous function at /home/ashesh/code/homebot/rpi/motion-detect-camera/release.nix:54:13, called from /nix/store/c3ilr85kwjiiq4xi6x0grj6sswqglrm4-source/lib/fixed-points.nix:69:67: | |
infinite recursion encountered, at /home/ashesh/code/homebot/rpi/motion-detect-camera/release.nix:81:8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment