Here’s the flake I use to work on a Python project:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = {
self,
nixpkgs,
}: let
system = "x86_64-linux";
pkgs = import nixpkgs {
system = system;
config.allowUnfree = true;
};
# nixpkgs.legacyPackages.${system};
fhs = pkgs.buildFHSUserEnv {
name = "python311";
targetPkgs = pkgs: [
pkgs.gcc.cc
pkgs.glibc
pkgs.zlib
pkgs.python311
pkgs.chromedriver
pkgs.google-chrome
];
runScript = "zsh";
};
in {
devShells.${system}.default = fhs.env;
};
}
As you can see, I use an FHS-compliant shell for this. Now the issue:
My python test suite expects an executable called google-chrome
, but installed with nix packages I end up with a binary that is called google-chrome-stable
.
Is there a way to have it appear under a different name? I tried creating a symbolic link, but that is (could have known) not possible within the shell. Any idea?
I truly appreciate any tips!
Simon