Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.

[DEVOPS-32] ensure pkgs/default.nix is up to date #82

Merged
merged 2 commits into from
Jul 1, 2017

Conversation

cleverca22
Copy link
Contributor

found an edgecase in testing this, updating pkgs/default.nix changes the build of stack2nix, and now travis cant use the cached copy, so it needs a PR built by hydra

@cleverca22 cleverca22 force-pushed the stack2nix-travis-testing branch 10 times, most recently from d164420 to edad927 Compare June 25, 2017 02:38
@cleverca22
Copy link
Contributor Author

and 2 more edge cases,

i also had an idea on how to perform stack2nix testing under hydra, just flag it as a fixed-output derivation, because we want the output to be "no differences found", and any deviation from that is a failure

  • stack2nix calls cabal2nix, cabal2nix calls nix-prefetch-url, and nix-prefetch-url fails hard in a build, it cant access /nix/var/db and Recursive Nix NixOS/nix#13 is currently not an option

@cleverca22 cleverca22 force-pushed the stack2nix-travis-testing branch 3 times, most recently from bc83c63 to 345c739 Compare June 25, 2017 03:32
@cleverca22 cleverca22 changed the title [wip] ensure pkgs/default.nix is up to date ensure pkgs/default.nix is up to date Jun 25, 2017
.travis.yml Outdated
@@ -5,6 +5,10 @@ env:

install:
- nix-env -iA nixopsUnstable -f '<nixpkgs>'
- echo "binary-caches = https://cache.nixos.org https://hydra.iohk.io" > ~/nix.conf
- echo "binary-cache-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" > ~/nix.conf
- export NIX_CONF_DIR=~
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bad idea since the default file does bring some sanity things.

Try to workaround the 14.04 bug by doing - export PYTHONPATH=

@@ -17,4 +16,5 @@ in rec {
];
}).config.system.build.amazonImage;
tests = import ./../tests { inherit pkgs supportedSystems; };
#stack2nix-output = callPackage ./check-stack2nix.nix { inherit (iohkpkgs) stack2nix; };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work since stack2nix is very impure, let's remove it from here :)


time nix-build -A stack2nix -o $scriptDir/stack2nix -Q -j 4

time $scriptDir/stack2nix/bin/stack2nix --revision 4bcf1e6b601d531f753ebdb6aec23e19d4b08e6c https://github.com/input-output-hk/cardano-sl.git > $scriptDir/default-2.nix
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hoping we could just run pkgs/generate.sh and check git diff to have no output. Then we wouldn't need this script at all. Am I missing something with that approach?

@cleverca22 cleverca22 force-pushed the stack2nix-travis-testing branch 9 times, most recently from 1f4a456 to 8e55aea Compare June 27, 2017 02:26
@cleverca22 cleverca22 changed the title ensure pkgs/default.nix is up to date [wip] ensure pkgs/default.nix is up to date Jun 27, 2017
@domenkozar
Copy link
Contributor

@cleverca22 let's try rebasing this on top of latest master to see what happens :)

@cleverca22 cleverca22 changed the title [wip] ensure pkgs/default.nix is up to date [wip] [DEVOPS-32] ensure pkgs/default.nix is up to date Jun 29, 2017
@cleverca22 cleverca22 force-pushed the stack2nix-travis-testing branch 7 times, most recently from c5a11ae to e05ef15 Compare June 30, 2017 01:00
@cleverca22 cleverca22 force-pushed the stack2nix-travis-testing branch 3 times, most recently from 8c42c6e to 4cd692e Compare June 30, 2017 22:51
@cleverca22 cleverca22 changed the title [wip] [DEVOPS-32] ensure pkgs/default.nix is up to date [DEVOPS-32] ensure pkgs/default.nix is up to date Jul 1, 2017
@cleverca22
Copy link
Contributor Author

@domenkozar all checks are now passing and the PR looks good to me

@domenkozar domenkozar merged commit 235dd70 into master Jul 1, 2017
@deepfire deepfire deleted the stack2nix-travis-testing branch March 7, 2018 13:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants