Openvpn : update_resolv.conf not found

Hi

I declare an issue : #73822 .

the package do not create the link between the store and the location /etc/openvpn.

What is the best solution to declare a static path ?

environment.etc.openvpn.source = pkgs.update-resolv-conf;

nix-build ?

Thank
Pierre

Don’t work the link are :crying_cat_face:

ls -la openvpn
lrwxrwxrwx 1 root root 19 Nov 20 21:36 openvpn -> /etc/static/openvpn

Preformatted text`

ls -la /etc/static/openvpn
lrwxrwxrwx 1 root root 73 Jan  1  1970 /etc/static/openvpn -> /nix/store/j2rz5ibq4idfgg015xwrkdjqc9kxc8z5-update-resolv-conf-2017-06-21

script are in /etc/static/openvpn/libexec/openvpn

I propose to modify the output .

installPhase = ''
    install -Dm555 update-resolv-conf.sh $out/libexec/openvpn/update-resolv-conf
    install -Dm555 update-systemd-network.sh $out/libexec/openvpn/update-systemd-network
    for i in $out/libexec/openvpn/*; do
      wrapProgram $i --prefix PATH : ${binPath}
    done
  '';

by

installPhase = ''
    install -Dm555 update-resolv-conf.sh $out/update-resolv-conf
    install -Dm555 update-systemd-network.sh $out/update-systemd-network
    for i in $out/*; do
      wrapProgram $i --prefix PATH : ${binPath}
    done
  '';

Somebody can it explain me how verify if it’s good ?

Pierre

Look at the solution :sunglasses:

A line like this one

 environment.etc.openvpn.source = "${pkgs.update-resolv-conf}/libexec/openvpn";

in configuration.nix solves the problem.