Skip to content

Add Nix Flake to run with Nix#38

Open
OhMyMndy wants to merge 4 commits into
yne:nixfrom
OhMyMndy:nixify
Open

Add Nix Flake to run with Nix#38
OhMyMndy wants to merge 4 commits into
yne:nixfrom
OhMyMndy:nixify

Conversation

@OhMyMndy

@OhMyMndy OhMyMndy commented Mar 29, 2024

Copy link
Copy Markdown
Contributor

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.

@yne

yne commented Mar 29, 2024

Copy link
Copy Markdown
Owner

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

yne commented Apr 3, 2024

Copy link
Copy Markdown
Owner

Changed + merged 🎉

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

@OhMyMndy

OhMyMndy commented Apr 6, 2024

Copy link
Copy Markdown
Contributor Author

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

OhMyMndy commented Apr 6, 2024

Copy link
Copy Markdown
Contributor Author

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

@yne

yne commented Apr 6, 2024

Copy link
Copy Markdown
Owner

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)

Comment thread dzr

# extraction + warning by charleywright, see: https://github.com/yne/dzr/issues/11
unscramble(){ printf "${8}${16}${7}${15}${6}${14}${5}${13}${4}${12}${3}${11}${2}${10}${1}${9}";}
unscramble(){ printf "%s" "${8}${16}${7}${15}${6}${14}${5}${13}${4}${12}${3}${11}${2}${10}${1}${9}";}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need the \ddd tranform

Comment thread dzr
@@ -1,5 +1,7 @@
#!/bin/sh

BINARY_NAME="$(basename "$0")"

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this break usage form folder

./cgi-bin/dzr /track/117581954
xargs: dzr-url: No such file or directory

@yne

yne commented Apr 6, 2024

Copy link
Copy Markdown
Owner

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

@yne

yne commented Apr 6, 2024

Copy link
Copy Markdown
Owner

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 yne changed the base branch from master to nix April 6, 2024 20:34
@yne yne mentioned this pull request Apr 7, 2024
@yne

yne commented Apr 7, 2024

Copy link
Copy Markdown
Owner

@OhMyMndy any chance to get this working ?

@OhMyMndy

Copy link
Copy Markdown
Contributor Author

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

@yne

yne commented Mar 8, 2026

Copy link
Copy Markdown
Owner

is it still a work in progress ?

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