Help customizing NixOps version

I’m trying to deploy using NixOps using a custom backend, not yet upstreamed.

I want to use a shell.nix to pin a version of nixpkgs and the fork of NixOps.

This is what I’ve come up with so far:

When I try running nix-shell though, I get trouble:

...
creating build/bdist.linux-x86_64/wheel/nixops-_version_.dist-info/WHEEL
Traceback (most recent call last):
  File "nix_run_setup", line 8, in <module>
    exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
  File "setup.py", line 30, in <module>
    cmdclass={'test': TestCommand}
  File "/nix/store/2smkcirh3snjk71ia9s3rmrkfzr1giia-python-2.7.15/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/nix/store/2smkcirh3snjk71ia9s3rmrkfzr1giia-python-2.7.15/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/nix/store/2smkcirh3snjk71ia9s3rmrkfzr1giia-python-2.7.15/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/nix/store/b2wb8vzqah0a0rcb9c2nx6g4wrrcb329-python2.7-bootstrapped-pip-18.1/lib/python2.7/site-packages/wheel/bdist_wheel.py", line 246, in run
    with WheelFile(wheel_path, 'w') as wf:
  File "/nix/store/b2wb8vzqah0a0rcb9c2nx6g4wrrcb329-python2.7-bootstrapped-pip-18.1/lib/python2.7/site-packages/wheel/wheelfile.py", line 40, in __init__
    raise WheelError("Bad wheel filename {!r}".format(basename))
wheel.cli.WheelError: Bad wheel filename 'nixops-_version_-py2-none-any.whl'
builder for '/nix/store/92crl1lx45y7vhn3s1p9s89wss3jljvg-nixops-1.6.1pre2706_d5ad09c.drv' failed with exit code 1
error: build of '/nix/store/92crl1lx45y7vhn3s1p9s89wss3jljvg-nixops-1.6.1pre2706_d5ad09c.drv' failed

Which is coming from here, and seems to have something to do with this regex not matching anything (I guess).

Has anyone encountered this usecase before (wanting to use a different version of NixOps than the one distributed with nixpkgs), and can provide some guidance?

Thanks!

I’ve found a relevant issue, which got closed.

Is the problem that the nixops package, as is, is not overridable?

1 Like

I’m not sure if it is relevant to your issue, but I use mkShell instead of mkDerivation. It could be that whatever version you are pinning to has an issue.

Edit: Sorry, I didn’t notice you had figured it out in your second post.

1 Like

Thanks for your comment!

I definitely should’ve used mkShell, not sure why I wasn’t. It does seem to produce a different error:

make: Entering directory '/build/source/doc/manual'
xsltproc --nonet --param section.autolabel 1 --param section.label.includes.component.label 1 --param html.stylesheet \'style.css\' --param xref.with.number.and.title 0 --param toc.section.depth 3 --param admon.style \'\' --param callout.graphics.extension \'.gif\' --param contrib.inline.enabled 0 --xinclude --stringparam profile.condition manual \
  /nix/store/5jpnxii380qc56wm6brhma6fbnplqlmj-docbook-xsl-ns-1.79.1/xml/xsl/docbook/profiling/profile.xsl manual.xml | \
  xsltproc --nonet --param section.autolabel 1 --param section.label.includes.component.label 1 --param html.stylesheet \'style.css\' --param xref.with.number.and.title 0 --param toc.section.depth 3 --param admon.style \'\' --param callout.graphics.extension \'.gif\' --param contrib.inline.enabled 0 --output manual.html /nix/store/5jpnxii380qc56wm6brhma6fbnplqlmj-docbook-xsl-ns-1.79.1/xml/xsl/docbook/xhtml/docbook.xsl -
/bin/sh: xsltproc: not found
/bin/sh: xsltproc: not found
make: *** [Makefile:16: manual.html] Error 127

I would still like to know if there’s a way to use overrideAttrs though, and if there isn’t one, why.
I’ve also started using Domen’s snippet, and it works.