New nix flake for development purposes #920

Open
majje wants to merge 1 commit from majje/nix-develop into master
majje commented 2024-11-22 08:02:30 +13:00 (Migrated from github.com)

Hi Mike

I tried to use the flake.nix in your repository but it didn't help me to setup a development shell. Your flake is probably used to create a nix package and it is using an nixos-23.11, and it failed with:

error: builder for '/nix/store/ai0fpifmgf8f5g3mbjw2q9wy5sglpgv1-windows-core-0.57.0.drv' failed with exit code 1;
       last 7 log lines:
       >
       > trying https://static.crates.io/crates/windows-core/0.57.0/download
       >   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
       >                                  Dload  Upload   Total   Spent    Left  Speed
       >   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
       > curl: (7) Failed to connect to static.crates.io port 443 after 166 ms: Couldn't connect to server
       > error: cannot download windows-core-0.57.0 from any mirror
       For full logs, run 'nix log /nix/store/ai0fpifmgf8f5g3mbjw2q9wy5sglpgv1-windows-core-0.57.0.drv'.

My flake should probably be mixed with the original flake, without breaking any existing functionality, but I'm no nix/nixos expert, so I just don't know how :-(
Before merging, at least have some nix expertise looking at it... (Maybe @Kodylow can have a look)

I got inspiration from https://drakerossman.com/blog/rust-development-on-nixos-bootstrapping-rust-nightly-via-flake

To build and run:

nix develop   # enter development shell
cargo build
./target/debug/gossip

Thanx for a great nostr client!

Hi Mike I tried to use the flake.nix in your repository but it didn't help me to setup a development shell. Your flake is probably used to create a nix package and it is using an nixos-23.11, and it failed with: ``` error: builder for '/nix/store/ai0fpifmgf8f5g3mbjw2q9wy5sglpgv1-windows-core-0.57.0.drv' failed with exit code 1; last 7 log lines: > > trying https://static.crates.io/crates/windows-core/0.57.0/download > % Total % Received % Xferd Average Speed Time Time Time Current > Dload Upload Total Spent Left Speed > 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 > curl: (7) Failed to connect to static.crates.io port 443 after 166 ms: Couldn't connect to server > error: cannot download windows-core-0.57.0 from any mirror For full logs, run 'nix log /nix/store/ai0fpifmgf8f5g3mbjw2q9wy5sglpgv1-windows-core-0.57.0.drv'. ``` My flake should probably be mixed with the original flake, without breaking any existing functionality, but I'm no nix/nixos expert, so I just don't know how :-( Before merging, at least have some nix expertise looking at it... (Maybe @Kodylow can have a look) I got inspiration from https://drakerossman.com/blog/rust-development-on-nixos-bootstrapping-rust-nightly-via-flake To build and run: ``` nix develop # enter development shell cargo build ./target/debug/gossip ``` Thanx for a great nostr client!
mikedilger commented 2024-11-22 12:01:13 +13:00 (Migrated from github.com)

I did not create the flake file in the gossip repo, and I had half a mind to not allow it because I have no way to verify that it even makes sense or perhaps contains hacks or something (I don't believe it does, but I can't vouch for it).

I did not create the flake file in the gossip repo, and I had half a mind to not allow it because I have no way to verify that it even makes sense or perhaps contains hacks or something (I don't believe it does, but I can't vouch for it).
majje commented 2024-11-22 12:08:51 +13:00 (Migrated from github.com)

I totally understand! It was just useful to me and wanted to share.
Actually, I almost wrote that my pull request probably should not be merged ;-P

(Hopefully someday I understand how to update this https://github.com/NixOS/nixpkgs/blob/nixos-24.05/pkgs/by-name/go/gossip/package.nix)

Close it! Thanx!

I totally understand! It was just useful to me and wanted to share. Actually, I almost wrote that my pull request probably should not be merged ;-P (Hopefully someday I understand how to update this https://github.com/NixOS/nixpkgs/blob/nixos-24.05/pkgs/by-name/go/gossip/package.nix) Close it! Thanx!
mikedilger commented 2024-11-22 12:35:29 +13:00 (Migrated from github.com)

Id prefer if you and @Kodylow came up with a flake file that works for both of you and I'll merge it... since we already have a flake file and it sounds like it might be wrong.

Id prefer if you and @Kodylow came up with a flake file that works for both of you and I'll merge it... since we already have a flake file and it sounds like it might be wrong.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin majje/nix-develop:majje/nix-develop
git switch majje/nix-develop

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff majje/nix-develop
git switch majje/nix-develop
git rebase master
git switch master
git merge --ff-only majje/nix-develop
git switch majje/nix-develop
git rebase master
git switch master
git merge --no-ff majje/nix-develop
git switch master
git merge --squash majje/nix-develop
git switch master
git merge --ff-only majje/nix-develop
git switch master
git merge majje/nix-develop
git push origin master
Sign in to join this conversation.
No description provided.