Skip to content

New nix flake for development purposes#920

Open
majje wants to merge 1 commit into
mikedilger:masterfrom
majje:nix-develop
Open

New nix flake for development purposes#920
majje wants to merge 1 commit into
mikedilger:masterfrom
majje:nix-develop

Conversation

@majje

@majje majje commented Nov 21, 2024

Copy link
Copy Markdown

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!

Uses nixos-unstable

nix develop   # enter development shell
cargo build
@mikedilger

Copy link
Copy Markdown
Owner

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

majje commented Nov 21, 2024

Copy link
Copy Markdown
Author

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

Copy link
Copy Markdown
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants