Hum, have you added your .nix
file to git with git add pkgs/…/yourfile.nix
? Otherwise, flake will ignore it to maximize reproducibility.
Uupps
havn’t done some steps in one of your posts, maybe that. Have to search in my terminal history…
Thats why i have to write a step by step manual…
Done that.
[wolf@daw:~/git/nixpkgs]$ git add pkgs/by-name/st/stereotool/package.nix
[wolf@daw:~/git/nixpkgs]$ export NIXPKGS_ALLOW_UNFREE=1
[wolf@daw:~/git/nixpkgs]$ nix profile install “.#stereotool” --impure
But
https://paste.simplylinux.ch/view/7e57a43f
The iconfile is on its place.! I could ask the maintainer to store the icon on his server?!
Same thing, add the icon in git with git add. Basically flake “removes” any file not in git.
OK, here if have to read more git tutorials. In my
ist no stereotool for now.
I have run
[wolf@daw:~/git/nixpkgs]$ git commit -am “stereotool: init at 10.21”
[add_stereotool 4c2cde396cb7] stereotool: init at 10.21
1 file changed, 165 insertions(+)
create mode 100644 pkgs/by-name/st/stereotool/package.nix
Was that to early? Thought, that will only change my “fork”
accepted not my credentials from git, becourse Support for password authentication was removed on August 13, 2021.
Was “myfork” ok, or does it need to be add_stereotool…Sorry for this stupid questions. But my git skills… You know… That needs time
OK, got it to push via a token… And copied via Github GUI the icon into the add_stereotool branch.
nix profile install “.#stereotool” --impure
It does still not find the icon.
Now i’m here. Thougt that i could test without doing the PR…
OK, so far… I’ve removed the by hand copied icon from branch add_stereotool, and forced the content to the remote.
git push myfork HEAD --force
Followed by:
nix profile install “.#stereotool” --impure
kbuildsycoca5
and voila. No errormessage and i get an icon to start with the png.
But only the _jack icon. Seems that there is something wrong…
seems good I guess.
Yeah, you can use this as you did, but what I use (and what is really handy), is that I create a key with:
$ ssh-keygen
(you can or not protect it with a password) and then I add the SSH public key (obtained via cat ~/.ssh/id_rsa.pub
) in github. If you setup a ssh agent you don’t even need to type your password every time. I think you can just run programs.ssh.startAgent = true;
in your configuration for this, or personally I use home manager for that:
# Gpg-agent
services.gpg-agent = {
enable = true;
defaultCacheTtl = 3600;
maxCacheTtl = 999999;
enableSshSupport = true;
};
Great job. This seems mostly good, just, again, indentation problems:
unpackPhase = ''
for srcFile in $srcs; do
cp $srcFile $(stripHash $srcFile)
done
'';
should be:
unpackPhase = ''
for srcFile in $srcs; do
cp $srcFile $(stripHash $srcFile)
done
'';
(the code is always shifted inside the braces/quotes etc, while the last quotes etc align with the line containing the first quote)
and:
installPhase = ''
runHook preInstall
install -Dm755 alsa $out/bin/stereo_tool_gui
wrapProgram $out/bin/stereo_tool_gui --prefix PATH : ${lib.makeBinPath [ kdialog ]}
install -Dm755 jack $out/bin/stereo_tool_gui_jack
wrapProgram $out/bin/stereo_tool_gui_jack --prefix PATH : ${lib.makeBinPath [ kdialog ]}
install -Dm755 cmd $out/bin/stereo_tool_cmd
mkdir -p $out/share/icons/hicolor/48x48/apps
cp ${ ./stereo-tool-icon.png } $out/share/icons/hicolor/48x48/apps/stereo-tool-icon.png
runHook postInstall
'';
should be:
installPhase = ''
runHook preInstall
install -Dm755 alsa $out/bin/stereo_tool_gui
wrapProgram $out/bin/stereo_tool_gui --prefix PATH : ${lib.makeBinPath [ kdialog ]}
install -Dm755 jack $out/bin/stereo_tool_gui_jack
wrapProgram $out/bin/stereo_tool_gui_jack --prefix PATH : ${lib.makeBinPath [ kdialog ]}
install -Dm755 cmd $out/bin/stereo_tool_cmd
mkdir -p $out/share/icons/hicolor/48x48/apps
cp ${ ./stereo-tool-icon.png } $out/share/icons/hicolor/48x48/apps/stereo-tool-icon.png
runHook postInstall
'';
I think the issue is that you gave the same name
to both entries, so all files are copied in stereotool.desktop
, hence only the last one is preserved. Just do something like pname = "${pname}-alsa"
and pname = "${pname}-jack";
for the other one, and it should work.
Then, you should be good submitting the PR. Also, when you create your PR, make sure to “squash” all your stereotool: init at 10.21
commits into a single one (I’m not sure if admins can squash them if you also have a commit about contributors). To see the number of commits to squash, just do $ git log
, and you will the the list of your last commits, then squash the last N commits (say N=4 for this example) with:
$ git reset --soft HEAD~4
$ git commit -am "stereotool: init at 10.21"
Nearly there
YESSSSS…
What do you think, could that work. Can’t test for now because the url isn’t existing… Still waiting…
];
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
# Source of programicon
i686-linux = [
(fetchurl {
name = "stereo-tool-icon";
url = "https://download.thimeo.com/stereo_tool_logo_10.png";
hash = "sha256-iEPqJvmXKXD4AVbM+1QZeUOwpMjMT7ROYNQpmhRVZyw=";
})
];
unpackPhase = ''
for srcFile in $srcs; do
cp $srcFile $(stripHash $srcFile)
You can either directly put the fetchurl
inside the cp
command, but it might be cleaner to declare it as a source. For that, you can just prepend it to the list of all sources like:
srcs = let
versionNoPoint = lib.replaceStrings [ "." ] [ "" ] version;
in [
(fetchurl {
name = "stereo-tool-icon.png";
url = "https://download.thimeo.com/stereo_tool_logo_10.png";
hash = "";
})
] ++ (
{
x86_64-linux = [ … ];
aarch64-linux = [ … ];
…
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}")
)
and change the line that copies the icon into something like:
cp stereo-tool-icon.png $out/share/icons/hicolor/48x48/apps/stereo-tool-icon.png
Ups. Had comitted. But there is a check running instantly, and the file isn’t there…
BTW, i’m now working on a howto für me, if some day this thread is lost, or something else.
Maybe it needs a last part, how to start over if something is going worse…
Hi, to answer your question in github, it is better to use this thread as people doing reviews on Github are quite busy and we don’t want to spam them with too much emails as they might just miss more important message later.
Great to see that you have finally the URL. So I don’t know much about github-desktop, so no idea what you did. But to restart from scratch, if you are not familiar with git, the simplest is to just backup your files, and restart the instructions from How to find needed librarys for closed source bin applications - #43 by tobiasBora You only need to run
$ git checkout -B add_stereotool
instead of
$ git checkout -b add_stereotool
if the branch already exists.
Before pushing, make sure to use git log
to see the list of commits you are pushing, and git show IDOFCOMMIT
to see the content of each commit.
Regarding your concerns about git being complicated, it certainly takes a bit of time to get used to it, but once you are familiar you will see it is not too complex. That being said, the complexity of git is quite impossible to avoid, here are not so much software allowing thousands of people to work on a single project at the same time while allowing reviews etc…
Means deleting the complete /nixpkgs/ directory, pull all new and copy back the package.nix in the newly created stereotool dir… and edit the maintainer file to insert my Rudiontheair…?
At least it is a simple and working solution ^^ A cleaner solution that does not involve the deletion of the nix directory would be to just fetch the latest version with
$ git fetch origin master
then backup your files as we did before, and do:
$ git checkout -B add_stereotool origin/master
to reset the position of the add_stereotool
branch to the latest commit in master (people can also use merge with rebase to move the changes of the branch to the new one, but in your case you anyway need to squash commits and recreate new commits with maintainers etc so it is not really simpler than just recreating these 3 files manually). At that step, master
and add_stereotool
will be exactly at the same position (check with git log
), so you can add you again to the list of maintainers as described above, with a separate commit. Then copy again the stereotool
folder tripple check that indentation is correct and that you can build it, and then do a commit again. Before pushing tripple check that you only have two commits, properly named as described above, you can inspect the content of the commits with git log
+ git show COMMITID
. Then push.
So seems like you have not added yourself to the list of maintainers, you copied the last version of your file… which is really not what you want to do as you removed all maintainers that would have been added since you first forked nixpkgs…
Maybe quadruple check next time
OK, now i’m here. (again… Git Log shows. But what to do with this information?
https://paste.simplylinux.ch/view/800c168f
That was the way.:
544 cd DEV
545 git clone GitHub - NixOS/nixpkgs: Nix Packages collection & NixOS
546 cd nixpkgs/
547 git remote add myfork GitHub - RudiOnTheAir/nixpkgs: Nix Packages collection & NixOS
548 git checkout -B add_stereotool
549 kate maintainers/maintainer-list.nix
550 git commit -am “maintainers: add RudiOnTheAir”
551 mkdir -p pkgs/by-name/st/stereotool/
552 mc >>> copy package.nix
554 export NIXPKGS_ALLOW_UNFREE=1
555 nix-build -A stereotool
556 git add pkgs/by-name/st/stereotool/package.nix
557 git commit -am “stereotool: init at 10.21”
558 git log
There are two commits, but what about with the others? I can see my package file and my added User in the maint list… So far, so good…