Installing wpsoffice, unpacking deb archives

The url for wpsoffice seems to be stale, so I tried using this:

nix-repl> u = fetchurl {

nix-repl> o = wpsoffice.overrideAttrs (o: {src = u;})

nix-repl> :b o
builder for '/nix/store/ly35v3apmszyacm266knmkk90bak5wzs-wpsoffice-' failed with exit code 1; last 3 log lines:
  unpacking sources
  unpacking source archive /nix/store/hajm4anmwrahljl603l7aibj9az7yp96-wps-office_11.1.0.9126.XA_amd64.deb
  do not know how to unpack source archive /nix/store/hajm4anmwrahljl603l7aibj9az7yp96-wps-office_11.1.0.9126.XA_amd64.deb
[0 built (1 failed), 0.0 MiB DL]
error: build of '/nix/store/ly35v3apmszyacm266knmkk90bak5wzs-wpsoffice-' failed

Nix expression for wpsoffice has an attribute named unpackCmd:

But for some reason it’s not being used here.

I noticed the drv you are actually building is version, please check if you accidently use an old channel

This is the output of nix-info -m:

 - system: `"x86_64-linux"`
 - host os: `Linux 4.19.108, NixOS, 19.09.2218.a81842b6994 (Loris)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.3`
 - channels(root): `"nixos-19.09.2218.a81842b6994"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Commit a81842b6994 in nixpkgs was made on march 4 this year.

Overriding unpackCmd to "${dpkg}/bin/dpkg -x $src ." but now I am getting another error saying:

unpacker produced multiple directories

The deb file contains etc, usr and opt folders.

wps get updated in Dec 3, 2019 after three years of the last version update and some build recipe changes, which is not included in 19.09:
Also notice the current package contains some unresolved problems as mentioned in the new pr:

1 Like

sourceRoot = "."; should do the trick. With multiple directories, the default scripts don’t know which directory to cd into.