Skip to content

Instantly share code, notes, and snippets.

@tosmi
Created July 7, 2017 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tosmi/198d86bd656ba1f461b1ad162a6f7c3d to your computer and use it in GitHub Desktop.
Save tosmi/198d86bd656ba1f461b1ad162a6f7c3d to your computer and use it in GitHub Desktop.
let
pkgs = import <nixpkgs> {};
stdenv = pkgs.stdenv;
ruby = pkgs.ruby_2_2;
in stdenv.mkDerivation rec {
name = "env";
buildInputs = [
ruby
];
}
@tosmi
Copy link
Author

tosmi commented Jul 7, 2017

yields:

build input /nix/store/29cj9f40783rkqzzmp2n70rbzfvnmykk-patchelf-0.9 /nix/store/b28rci2pd2bjrcgj76x594phflbd6sv8-paxctl-0.9 /nix/store/mjjy30kxz775bhhi6j9phw81qh6dsbrf-move-docs.sh /nix/store/81ikflgpwzgjk8b5vmvg9gaw9mbkc86k-compress-man-pages.sh /nix/store/vgz4sms56q3dnwrvcpkjq26vs16gr646-strip.sh /nix/store/xfgjfjcq34fwfbfi1idp2nh81kpigch7-patch-shebangs.sh /nix/store/yb3lf4hw8126pjn6qkby28r79li8dlwr-multiple-outputs.sh /nix/store/z82dl6ialp166drqihzkz67nkl6w3l16-move-sbin.sh /nix/store/a92kz10cwkpa91k5239inl3fd61zp5dh-move-lib64.sh /nix/store/iwa35vp5b9rg5jlpxplivl2dhy5spxza-set-source-date-epoch-to-latest.sh /nix/store/b43ww9wkpwjxha7ql7mizxpa2vb6yk5r-gcc-wrapper-5.4.0 does not exist

@tokudan
Copy link

tokudan commented Jul 7, 2017

works for me(tm):

[tokudan@yuna:/tmp/tmp.fSr5otP98i]$ cat default.nix 
let
  pkgs = import <nixpkgs> {};
  stdenv = pkgs.stdenv;
  ruby = pkgs.ruby_2_2;
in stdenv.mkDerivation rec {
  name = "env";
  buildInputs = [
    ruby
  ];
}

[tokudan@yuna:/tmp/tmp.fSr5otP98i]$ nix-shell default.nix 

[nix-shell:/tmp/tmp.fSr5otP98i]$ which ruby
/nix/store/ldizyxw4cn9fidhymgqkrf6j3jq6xclc-ruby-2.2.5/bin/ruby

[nix-shell:/tmp/tmp.fSr5otP98i]$ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment