Comments (7)
I have a use case this is biting me in. The scripts are running as root already under systemd.
My approach has been to use substitute in place:
(substituteAll {
...
mount = "${util-linux}/bin/mount";
umount = "${util-linux}/bin/umount";
})
for mountloc in $(@mount@ \
...
@umount@ "$mountloc" || true
done
and then passing resholve:
keep = [
"${util-linux}/bin/mount"
"${util-linux}/bin/umount"
];
but I would prefer to tell resholve that I do want it to resolve these paths even if it is troublesome.
I guess the main reason I prefer it is because I accidentally made a mistake the first time I made this adjustment: I passed an absolute path to umount
as unmount
and my script broke.
from resholve.
@SamLukeYes the last workaround in the first post may help here. Since 0.8.3 you can use fix.<command> = true
to bypass the error here and force it to resolve from inputs.
(This assumes that you've verified that the unwrapped commands will run correctly for the invocations in your script.)
from resholve.
There's now a real nixpkgs case here:
- https://gist.github.com/r-rmcgibbo/cd7ae74a0029886c15c8071e0e7c9a76
- https://github.com/archlinux/arch-install-scripts
- https://github.com/NixOS/nixpkgs/pull/138080/files#diff-724a80eaed950d49b1a3c49a83efda4498d574f4be58a130f66c675e6a4fafd2R56-R60
from resholve.
Additional context-dumping for later:
- NixOS/nixpkgs#124536 (comment)
- https://gist.github.com/Infinisil/3366e7dfc9a01f6eeb25b5cb475cc585
- https://search.nixos.org/options?channel=21.05&show=security.wrappers&from=0&size=50&sort=relevance&type=packages&query=wrappers
from resholve.
msmtpq
is broken because of ping (see NixOS/nixpkgs#195532). The approach here doesn't appear to work.
I'd be grateful for some help — perhaps the resolution could then be added to the documentation?
from resholve.
@dbaynard Just in case you're watching here but not there, I reached out to what I assume is your handle on Matrix earlier this evening.
from resholve.
I have a use case this is biting me in. The scripts are running as root already under systemd.
My approach has been to use substitute in place:
(substituteAll { ... mount = "${util-linux}/bin/mount"; umount = "${util-linux}/bin/umount"; })
for mountloc in $(@mount@ \ ... @umount@ "$mountloc" || true done
and then passing resholve:
keep = [ "${util-linux}/bin/mount" "${util-linux}/bin/umount" ];
but I would prefer to tell resholve that I do want it to resolve these paths even if it is troublesome.
I guess the main reason I prefer it is because I accidentally made a mistake the first time I made this adjustment: I passed an absolute path to
umount
asunmount
and my script broke.
There's a similar case in arch-install-scripts
. When using NixOS's setuid wrappers, its unshare mode doesn't work (https://github.com/archlinux/arch-install-scripts/issues/38). I think simply resolving mount/umount would fix it.
from resholve.
Related Issues (20)
- `AttributeError` when resolving `install --strip-program` HOT 2
- `AttributeError` when resolving `sort --compress-program=`
- exercer rule not being applied HOT 3
- support mkDerivation `finalAttrs` call pattern? HOT 1
- Function argument substitution failed HOT 2
- Build error on package using resholve HOT 1
- failure to correctly resolve absolute paths shadowed by builtins HOT 2
- Port to python3? HOT 4
- Parsing error on &! HOT 3
- resholve Nix API mangling package meta HOT 1
- Issue parsing zsh nested expansion. HOT 1
- Port to Python 3 HOT 8
- when invoked with multiple scripts, `--prologue` only applies to the first HOT 2
- handling commands that run other commands in a different path-space (different system, chroot, vm, etc.) HOT 2
- position indicators may be wrong in tab-indented scripts
- look for "unresholved" paths
- doublecheck coproc and execer check
- Missing subsequent `! type <command>` replacements HOT 4
- `make ci` fails to `touch` files HOT 4
- `make update` fails to find `../../nixpkgs` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from resholve.