dzr icon indicating copy to clipboard operation
dzr copied to clipboard

Add Nix Flake to run with Nix

Open OhMyMndy opened this issue 1 year ago • 9 comments

Hello!

Thanks for this awesome project!

I created a Nix Flake, so you can run dzr with one command. All the dependencies are included in the Flake and locked to a specific version.

To update the dependencies nix flake update can be run and the flake.lock file will be updated in place with the latest packages from nixpkgs-unstable.

To develop with Nix, just clone the repo and run nix run in the directory to run the local version of ./dzr! Passing arguments can be done as such nix run . -- /track/2317752015 or run the Flake directly: nix run github:OhMyMndy/dzr/1be7e5288d6c8b9226c2596a615225630ee7b848' -- /track/2317752015 for one of the last commits in this PR. You cannot link directly to a branch since that is not reproducible because you don't know when the upstream branch changes, the commit hash either exists, or it doesn't, always giving the same application and dependencies.

OhMyMndy avatar Mar 29 '24 13:03 OhMyMndy

damn, I shall really try nix. this looks really cool

instead of the Nix paragraph in the readme, can you put something like

Nix + Flakes | blablabla

in the Install table (and move the row before vscode, with all others Oses)

yne avatar Mar 29 '24 16:03 yne

Changed + merged :tada:

@OhMyMndy Would it be possible to move nix-related files into a subfolder ?

yne avatar Apr 03 '24 22:04 yne

I don't think that is possible, at least it isn't as bad as having a Javascript project which has 20 different config files in the root directory of your project.

Thanks for merging!

OhMyMndy avatar Apr 06 '24 16:04 OhMyMndy

Damn, I am such an idiot, had the command in the README wrong, but correct in my first comment in this PR

OhMyMndy avatar Apr 06 '24 16:04 OhMyMndy

ni biggie I'll update to

nix run github:yne/dzr

Also, the use of %s in unscramble printf has broken the key extract (and brew CI checks)

yne avatar Apr 06 '24 16:04 yne

@OhMyMndy does using BINARY_NAME="$0" break nix ?

yne avatar Apr 06 '24 18:04 yne

I'm rewinding master since it does not work on my NixOS install (only dzr is copied into the /nix/store/) also too much breaking changes ($0 and key extract)

yne avatar Apr 06 '24 20:04 yne

@OhMyMndy any chance to get this working ?

yne avatar Apr 07 '24 13:04 yne

@yne I'll give this another go this weekend!

OhMyMndy avatar Apr 26 '24 12:04 OhMyMndy