Comments (3)
@yajo You can produce the upgraded nix-portable declaratively by overriding the flake inputs.
from nix-portable.
Can you elaborate for beginners like me? My build script (for netlify) looks like
wget -nv https://github.com/DavHau/nix-portable/releases/download/v009/nix-portable
chmod +x nix-portable
./nix-portable nix-build
how would I change that to get a specific version of nix?
from nix-portable.
@nomeata Sorry for late reply.
As nix-portable enables the flake features by default, you can make use it to build and run the Nix Flakes. You can find a Flakes introduction on the NixOS Wiki:
https://nixos.wiki/wiki/Flakes
There are several ways to build nix-portable from flake.
The most reliable one is to write a flake.nix
. This one will work if you simply want to get an updated nix-portable
.
{
description = "My custom overrided nix-portable flake";
# The nixpkgs revision to use
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
# The nix revision to use
inputs.nix.url = "github:NixOS/nix/2.5.1";
inputs.nix.inputs.nixpkgs.follows = "nixpkgs";
# We don't need to benchmark Nix here.
# Let's opt out the additional nixpkgs
# that causes constant changes of `flake.lock`.
inputs.nix.inputs.nixpkgs-regression.follows = "nixpkgs";
inputs.nix-portable-flake.url = "github:DavHau/nix-portable/v009";
inputs.nix-portable-flake.inputs.nixpkgs.follows = "nixpkgs";
inputs.nix-portable-flake.inputs.defaultChannel.follows = "nixpkgs";
inputs.nix-portable-flake.inputs.nix.follows = "nix";
outputs = { nix-portable-flake, ... }: nix-portable-flake.outputs;
}
If the file is inside a Git repo, you can then run
$ nix build my/directory#nix-portable
to build the executable with the specified Nixpkgs and Nix versions.
If the file is not inside a Git repo, change my/directory
to path:my/directory
.
from nix-portable.
Related Issues (20)
- Option to run system-wide Nix on systems with Nix installed HOT 5
- No output on private Github Actions HOT 1
- Spaces in paths not escaped. — **Does `rm -rf` on arbitrary paths**, I think? HOT 1
- `error: cannot connect to socket at '/nix/var/nix/daemon-socket/socket': No such file or directory`
- Is this project alive? HOT 2
- Some features this project should have
- There should be a discord server for nix portable
- I've made some bash script utilities for this project. Are you interested in putting a link to my project to your readme? HOT 2
- an update to nix portable HOT 6
- armv7l-linux support
- home-manager HOT 9
- Build fails trying to install isl
- Installing python 3.11 fails HOT 1
- Fails to run with vfs mount
- nix-portable breaks on symlinked home directory
- Error "nix is unable to build packages" when there's nothing to build HOT 1
- Debugging 'unzip: short read' HOT 2
- Sudo in nix-portable HOT 6
- nix-store no libgssapi_krb5.so.2 HOT 2
- How to update to nixos 23.11? HOT 1
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 nix-portable.