You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As stated in the title, though I'm still not too comfortable with Nix stuff so it's likely me doing something wrong or probably an issue on the nix/home-manager side rather than a nickel one.
The situation is that when used like nix run github:tweag/nickel/<tag> or nix shell github:tweag/nickel/<tag> the binary cache works and no compilation is ever needed. However if I use github:tweag/nickel/<tag> as my nixos configuration flake input, and reference the input inside the home-manager module through extraSpecialArgs, then regardless of which <tag> I choose, a full rust compilation was always performed (on the first time this <tag> is evaluated).
Below is an example config for my nix/home-manager setup on Ubuntu:
# flake.nix{description="Home Manager configuration";inputs=rec{# Specify the source of Home Manager and Nixpkgs.nixpkgs-unstable.url="github:nixos/nixpkgs/nixos-unstable";nixpkgs=nixpkgs-unstable;home-manager={url="github:nix-community/home-manager";inputs.nixpkgs.follows="nixpkgs";};nickel={url="github:tweag/nickel/1.5.0";# inputs.nixpkgs.follows = "nixpkgs"; <-- Whether this line is commented or not has no effect to using binary cache.};};outputs={nixpkgs,nixpkgs-unstable,home-manager,nickel, ... }:
letsystem="x86_64-linux";pkgs=importnixpkgs{inheritsystem;config.allowUnfree=true;};pkgs-unstable=importnixpkgs{inheritsystem;config.allowUnfree=true;};in{homeConfigurations."ben"=home-manager.lib.homeManagerConfiguration{inheritpkgs;# Specify your home configuration modules here, for example,# the path to your home.nix.modules=[./home.nix];extraSpecialArgs={inheritnickelsystempkgs-unstable;};};};}# home.nix{config,pkgs,pkgs-unstable,system,nickel, ... }:
{
...
home.packages=[# nickel.packages.${system}.nickel-lang-cli <-- also tried to specify the package output, but still recompiles.nickel.packages.${system}.default];}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
As stated in the title, though I'm still not too comfortable with Nix stuff so it's likely me doing something wrong or probably an issue on the nix/home-manager side rather than a nickel one.
The situation is that when used like
nix run github:tweag/nickel/<tag>
ornix shell github:tweag/nickel/<tag>
the binary cache works and no compilation is ever needed. However if I usegithub:tweag/nickel/<tag>
as my nixos configuration flake input, and reference the input inside the home-manager module throughextraSpecialArgs
, then regardless of which<tag>
I choose, a full rust compilation was always performed (on the first time this<tag>
is evaluated).Below is an example config for my nix/home-manager setup on Ubuntu:
Any guidance is appreciated.
Beta Was this translation helpful? Give feedback.
All reactions