Skip to content

Instantly share code, notes, and snippets.

@Arkham
Created September 20, 2021 15:54
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 Arkham/31297c1d75fc59f723a50063bc0f5739 to your computer and use it in GitHub Desktop.
Save Arkham/31297c1d75fc59f723a50063bc0f5739 to your computer and use it in GitHub Desktop.
let
sources = import ./nix/sources.nix { };
nixpkgs = import sources.nixpkgs { };
nixpkgs-ruby267 = import sources.nixpkgs-ruby267 { };
in nixpkgs.mkShell {
buildInputs = [
nixpkgs.go
nixpkgs-ruby267.ruby_2_6
];
}
{
"nixpkgs": {
"branch": "release-21.05",
"description": "Nix Packages collection",
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5f244caea76105b63d826911b2a1563d33ff1cdc",
"sha256": "1xlgynfw9svy7nvh9nkxsxdzncv9hg99gbvbwv3gmrhmzc3sar75",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/5f244caea76105b63d826911b2a1563d33ff1cdc.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs-ruby267": {
"branch": "nixpkgs-unstable",
"description": "Nix Packages collection",
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "860b56be91fb874d48e23a950815969a7b832fbc",
"sha256": "07i03028w3iak0brdnkp79ci8vqqbrgr5p5i9sk87fhbg3656xhw",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/860b56be91fb874d48e23a950815969a7b832fbc.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
$ go version
go version go1.16.4 darwin/amd64
$ ruby --version
ruby 2.6.7p197 (2021-04-05) [x86_64-darwin17]
@rofrol
Copy link

rofrol commented Nov 15, 2021

Shouldn't there be import ./nix/sources.json?

@Arkham
Copy link
Author

Arkham commented Nov 15, 2021

No, nix/sources.nix is the file autogenerated by niv which contains a nix expression that loads nix/sources.json.

@rofrol
Copy link

rofrol commented Nov 15, 2021

Can you show complete working example?

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