Skip to content

Instantly share code, notes, and snippets.

@ony
Last active March 29, 2021 23:33
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 ony/51393bdc6566d3bfa764bd9b726bab96 to your computer and use it in GitHub Desktop.
Save ony/51393bdc6566d3bfa764bd9b726bab96 to your computer and use it in GitHub Desktop.
cherry-pick packages in nix between channels
# Motivation:
# - System uses <nixos> 20.09
# - Pulling any package from <nixpkgs-unstable> effectively keeps part of the system duplicated
self: super:
let
nixpkgs-unstable = import <nixpkgs-unstable> { };
cherryPick = pkg: pkg.override (origArgs: builtins.intersectAttrs origArgs self);
in {
zig-unstable = (cherryPick nixpkgs-unstable.zig).override {
llvmPackages = self.llvmPackages_11;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment