Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mitschemeX11: init at 9.2 #33100

Merged
merged 1 commit into from Dec 30, 2017
Merged

mitschemeX11: init at 9.2 #33100

merged 1 commit into from Dec 30, 2017

Conversation

olynch
Copy link
Contributor

@olynch olynch commented Dec 27, 2017

Motivation for this change

Add a variant of mitscheme that has x11 support in order to run edwin.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Copy link
Member

@lukateras lukateras left a comment

Choose a reason for hiding this comment

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

Looks good!

@@ -29,6 +30,8 @@ stdenv.mkDerivation {
sha256 = "0w5ib5vsidihb4hb6fma3sp596ykr8izagm57axvgd6lqzwicsjg";
};

buildInputs = if enableX11 then [xlibsWrapper] else [];
Copy link
Member

@lukateras lukateras Dec 28, 2017

Choose a reason for hiding this comment

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

Could be buildInputs = stdenv.lib.optionals enableX11 [ xlibsWrapper ];

With inherit (stdenv.lib) optionals optionalString; in let binding stdenv.lib can be omitted.

Copy link
Member

Choose a reason for hiding this comment

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

Actually even buildInputs = stdenv.lib.optional enableX11 xlibsWrapper; (optionals -> optional)

Copy link
Member

@lukateras lukateras Dec 29, 2017

Choose a reason for hiding this comment

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

It'd be better to have buildInputs as a list so that additional build inputs may be added in an override. It also doesn't scale well, if this derivation ever needed another build input, it would have to switch back to optionals.

@@ -9,7 +10,7 @@ let
else "";
in
stdenv.mkDerivation {
name = "mit-scheme-${version}";
name = if enableX11 then "mit-scheme-x11-${version}" else "mit-scheme-${version}";
Copy link
Member

Choose a reason for hiding this comment

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

Could be name = "mit-scheme${stdenv.lib.optionalString enableX11 "-x11"}-${version}";

@lukateras
Copy link
Member

@GrahamcOfBorg build mitschemeX11

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Failure for system: x86_64-darwin

Package ‘mit-scheme-x11-9.2’ in /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/pkgs/development/compilers/mit-scheme/default.nix:72 is not supported on ‘x86_64-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Failure for system: aarch64-linux

checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for native-code support... configure: error: unable to determine native-code type
builder for '/nix/store/3wdh0rgpmx1ww2vd0ngynb1dmmk9kcgh-mit-scheme-x11-9.2.drv' failed with exit code 1
error: build of '/nix/store/3wdh0rgpmx1ww2vd0ngynb1dmmk9kcgh-mit-scheme-x11-9.2.drv' failed

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Success for system: x86_64-linux

make[1]: Entering directory '/tmp/nix-build-mit-scheme-x11-9.2.drv-0/mit-scheme-9.2/doc/sos'
/nix/store/hw5a3mifkrzd8y0pxs7nzzr4yscg08mw-coreutils-8.28/bin/install -c --preserve-timestamps -m 644 mit-scheme-sos.ps /nix/store/dw4yrpa87m15dmshfrwlh9rjz2psfiim-mit-scheme-x11-9.2/lib/mit-scheme/doc/.
make[1]: Leaving directory '/tmp/nix-build-mit-scheme-x11-9.2.drv-0/mit-scheme-9.2/doc/sos'
making install-ps in user-manual
make[1]: Entering directory '/tmp/nix-build-mit-scheme-x11-9.2.drv-0/mit-scheme-9.2/doc/user-manual'
/nix/store/hw5a3mifkrzd8y0pxs7nzzr4yscg08mw-coreutils-8.28/bin/install -c --preserve-timestamps -m 644 mit-scheme-user.ps /nix/store/dw4yrpa87m15dmshfrwlh9rjz2psfiim-mit-scheme-x11-9.2/lib/mit-scheme/doc/.
make[1]: Leaving directory '/tmp/nix-build-mit-scheme-x11-9.2.drv-0/mit-scheme-9.2/doc/user-manual'
make: Leaving directory '/tmp/nix-build-mit-scheme-x11-9.2.drv-0/mit-scheme-9.2/doc'
post-installation fixup
/nix/store/dw4yrpa87m15dmshfrwlh9rjz2psfiim-mit-scheme-x11-9.2

@lukateras lukateras merged commit 41ab3d4 into NixOS:master Dec 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants