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

nix-shell with data packages #3837

Open
davidak opened this issue Jul 19, 2020 · 5 comments
Open

nix-shell with data packages #3837

davidak opened this issue Jul 19, 2020 · 5 comments
Labels
feature Feature request or proposal stale

Comments

@davidak
Copy link
Member

davidak commented Jul 19, 2020

Describe the bug
When i open a nix-shell with a packaged program, the program is available in the shell (it is in the $PATH).
But what about packages with data, like fonts?

To Reproduce

I want to test pango-view to preview a font. But i have no fonts installed.

Steps to reproduce the behavior:

  1. nix run nixpkgs.pango nixpkgs.fira-code
  2. search for the font:
[davidak@gaming:~]$ find / -name fira-code -print 2>/dev/null
/home/davidak/nixpkgs/pkgs/data/fonts/fira-code
/home/davidak/code/nixpkgs/pkgs/data/fonts/fira-code
/nix/store/vccsh938rxpxxvn9785vf5jbhadbgpfj-source/pkgs/data/fonts/fira-code
/nix/store/sx30vcw1cysrsbq9rdbcqladfhjb4ngx-source/pkgs/data/fonts/fira-code
/nix/store/s4b194dh5i9av3q5sc010baj40jk5m1f-opencl_pr/pkgs/data/fonts/fira-code
/nix/store/vf9y7694jgidaxg8d5j1mcgnlk5qspdw-2b417708c282d84316366f4125b00b29c49df10f.tar.gz/pkgs/data/fonts/fira-code
/nix/store/dk1x9r3q3448v3n1g40gsd6x0q9gngv9-nixos-20.03.2262.2b417708c28/nixos/pkgs/data/fonts/fira-code
/nix/store/6icrrsxyz4afd3d5iaivynb449aypnwx-nixos-20.03.2611.bb8f0cc2279/nixos/pkgs/data/fonts/fira-code
/nix/store/ixarh4adik6nnn7fc769yfnhdp5y07fg-nixos-20.09pre130979.gfedcba/nixos/pkgs/data/fonts/fira-code
/nix/store/c38b683amd74aj0qjk4d5iyq1k7aw93i-nixos-unstable-20.09pre234242.c71518e75bf/nixos-unstable/pkgs/data/fonts/fira-code
/nix/store/1pxxyqddi54ly4bnqksw5sj9hn1xcbdd-nixos-unstable-20.09pre230335.9480bae3370/nixos-unstable/pkgs/data/fonts/fira-code
/nix/store/k70za9rz3z5wq6d7ni6b5n3azgdpyklb-nixos-20.03.1950.48723f48ab9/nixos/pkgs/data/fonts/fira-code
/nix/store/bla4p2frz17sykbifsdda48i5jh6yyq7-nixos-unstable-20.09pre226148.0f5ce2fac0c/nixos-unstable/pkgs/data/fonts/fira-code
/nix/store/a5inn8qk5sa8dgc0zbb6llprcj4rw16a-nixos-20.03.2141.8b071be7512/nixos/pkgs/data/fonts/fira-code
/nix/store/s0zbwq5dzr7nc4f2n00qd5gyfrpkqm2q-nixos-20.09pre130979.gfedcba/nixos/pkgs/data/fonts/fira-code
/nix/store/bpyc413pyxbfpsbmv997k9saplq49rgb-nixos-unstable-20.09pre228622.029a5de0839/nixos-unstable/pkgs/data/fonts/fira-code
/nix/store/czc1plrs0fqx3dpb47paf62npc3lzr72-nixos-20.09pre-git/nixos/pkgs/data/fonts/fira-code

that's not the font, but nixpkgs definition of it

  1. open this ticket

Expected behavior
be able to use the font in the shell

Notify maintainers

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.7.8, NixOS, 20.03.2611.bb8f0cc2279 (Markhor)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.6
  • channels(root): "home-manager-20.03, nixos-20.03.2611.bb8f0cc2279, nixos-hardware, nixos-unstable-20.09pre234242.c71518e75bf"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
@davidak davidak added the bug label Jul 19, 2020
@edolstra edolstra added feature Feature request or proposal and removed bug labels Jul 20, 2020
@matthewbauer
Copy link
Member

Fontconfig requires a cache to work, so there's not an easy solution like just appending to some environment like with PATH. We could set a custom FONTCONFIG_FILE in a fontconfig setup-hook that generates a custom cache.

@FRidh
Copy link
Member

FRidh commented Jul 27, 2020

We need a more advanced buildEnv that can, given a set of packages, determine how they should be composed.

@stale
Copy link

stale bot commented Feb 12, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Feb 12, 2021
@austinbutler
Copy link
Member

Seems a workaround has been found here: NixOS/nixpkgs#24485

@stale stale bot removed the stale label Aug 26, 2021
@stale
Copy link

stale bot commented Apr 16, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request or proposal stale
Projects
None yet
Development

No branches or pull requests

5 participants