Skip to content

miniBill/de-generate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

De-generate

Dependency generator for prebuilt binaries and shared libraries in NixOS.

How?

# Install
nix-env -iA nixos.nix-index nixos.git
nix-index
git clone https://github.com/lexleogryfon/de-generate.git
cd ./de-generate
# Use
nix-shell template.nix
./nix-de-generate /home/usr/path/to/folder_with_executables
# a file newenv.nix should appear in current directory
# with list of packages to satisfy dependency requirements.

Why?

Due current state of the art NixOS design, you can't just run downloaded dynamically linked portable application outside of nixpkgs repo and expect it to work. When you attempt to run such app inside pkgs.buildFHSUserEnv, you may see that it couldn't find some libraries. Previously you might be forced to find package for each lib manually with nix-locate, fortunately now you could just execute nix-de-generate against target directory and it will generate newenv.nix with possible dependencies. Theoretically project could be scaled to resolve dependecies in other distros too, such as Arch or Fedora.

https://nixos.wiki/wiki/FAQ#I.27ve_downloaded_a_binary.2C_but_I_can.27t_run_it.2C_what_can_I_do.3F

https://nixos.wiki/wiki/Packaging_Binaries#Extra_Dynamic_Libraries

About

Dependency generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.8%
  • Nix 5.2%