Re: [Nix-dev] ioquake3 on nixos
Hi, On 04/19/2016 07:20 AM, Máté Kovács wrote: > (In case you're wondering: I didn't yet figure out what's wrong with my > channels, so I'm pointing to a clone of the nixpkgs github repo using > the -I option for building the game.) Try my fix, I think it might work. My theory is that points to your 15.09 channel because we have /nix/var/nix/profiles/per-user/root/channels/nixos in NIX_PATH by default. When nix sees , it tries to find directory "foo" in all paths listed in NIX_PATH. "nixos" channel has "nixpkgs" symlink inside which points to itself: /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs -> .. So that's what gets found when you do `import `. Renaming "nixpkgs-small" channel to "nixpkgs" should fix this because it gets higher priority. -- Nikolay. ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] ioquake3 on nixos
Hi all, I made a small improvement to the derivation for playing the game: { nixpkgs ? import { } }: with nixpkgs.lib; let paks = nixpkgs.stdenv.mkDerivation { name = "quake3-arena"; sources = sourceFilesBySuffices ./baseq3 [".pk3"]; buildCommand = '' install -D -m 644 $sources/* -t $out/baseq3/ ''; }; in nixpkgs.quake3wrapper { paks = [ paks nixpkgs.quake3pointrelease ]; } This will copy all pk3 files to the destination baseq3, which comes in handy if you have custom maps and mods. (In case you're wondering: I didn't yet figure out what's wrong with my channels, so I'm pointing to a clone of the nixpkgs github repo using the -I option for building the game.) Cheers, Mate On Sat, Apr 9, 2016 at 5:44 PM Nikolay Amiantov wrote: > Try to rename `nixpkgs-small` to just `nixpkgs` (using the same URL) -- > if I understand correctly what's going on, it should help. I don't > remember how exactly to do it -- you can remove `nixpkgs-small` and add > `nixpkgs` if everything else betrays. > > -- > Nikolay. > > On 04/09/2016 10:41 PM, Máté Kovács wrote: > > It seems like I'm unable to use some expressions that have seemingly > > been added a long time ago, it's not just quake3wrapper. > > > >> nix-instantiate --eval '' -A lib.nixpkgsVersion > > "15.09.1056.9a7b24a" > > > >> nix-channel --list > > nixpkgs-small http://nixos.org/channels/nixpkgs-unstable-small > > > >> sudo nix-channel --list > > nixos https://nixos.org/channels/nixos-15.09 > > > > Do you see anything suspicious here? I've been suspecting for a while > > now that there's something fishy with my nixpkgs, but I have trouble > > figuring it out. I really appreciate your help! :) > ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] ioquake3 on nixos
Try to rename `nixpkgs-small` to just `nixpkgs` (using the same URL) -- if I understand correctly what's going on, it should help. I don't remember how exactly to do it -- you can remove `nixpkgs-small` and add `nixpkgs` if everything else betrays. -- Nikolay. On 04/09/2016 10:41 PM, Máté Kovács wrote: > It seems like I'm unable to use some expressions that have seemingly > been added a long time ago, it's not just quake3wrapper. > >> nix-instantiate --eval '' -A lib.nixpkgsVersion > "15.09.1056.9a7b24a" > >> nix-channel --list > nixpkgs-small http://nixos.org/channels/nixpkgs-unstable-small > >> sudo nix-channel --list > nixos https://nixos.org/channels/nixos-15.09 > > Do you see anything suspicious here? I've been suspecting for a while > now that there's something fishy with my nixpkgs, but I have trouble > figuring it out. I really appreciate your help! :) ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] ioquake3 on nixos
It seems like I'm unable to use some expressions that have seemingly been added a long time ago, it's not just quake3wrapper. > nix-instantiate --eval '' -A lib.nixpkgsVersion "15.09.1056.9a7b24a" > nix-channel --list nixpkgs-small http://nixos.org/channels/nixpkgs-unstable-small > sudo nix-channel --list nixos https://nixos.org/channels/nixos-15.09 Do you see anything suspicious here? I've been suspecting for a while now that there's something fishy with my nixpkgs, but I have trouble figuring it out. I really appreciate your help! :) On Sat, Apr 9, 2016 at 3:06 AM Nikolay Amiantov wrote: > quake3wrapper was added somewhere in December, so you should have it if > you use NixOS unstable. Can you run this: > > > nix-instantiate --eval '' -A lib.nixpkgsVersion > > to make sure that resolves to something recent enough? Also run: > > > nix-channel --list > > sudo nix-channel --list > > -- > Nikolay. > > On 04/09/2016 10:48 AM, Máté Kovács wrote: > > Hi all, > > > > Building Nikolay's script fails on my NixOS with: > > error: attribute ‘quake3wrapper’ missing, at > /home/mate/q3/default.nix:11:4 > > > > Is quake3wrapper not available yet? > > (I have the nixos-unstable-small channel added.) > > > > Thanks, > > Mate > ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] ioquake3 on nixos
quake3wrapper was added somewhere in December, so you should have it if you use NixOS unstable. Can you run this: > nix-instantiate --eval '' -A lib.nixpkgsVersion to make sure that resolves to something recent enough? Also run: > nix-channel --list > sudo nix-channel --list -- Nikolay. On 04/09/2016 10:48 AM, Máté Kovács wrote: > Hi all, > > Building Nikolay's script fails on my NixOS with: > error: attribute ‘quake3wrapper’ missing, at /home/mate/q3/default.nix:11:4 > > Is quake3wrapper not available yet? > (I have the nixos-unstable-small channel added.) > > Thanks, > Mate ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] ioquake3 on nixos
Hi all, Building Nikolay's script fails on my NixOS with: error: attribute ‘quake3wrapper’ missing, at /home/mate/q3/default.nix:11:4 Is quake3wrapper not available yet? (I have the nixos-unstable-small channel added.) Thanks, Mate On Fri, Apr 8, 2016 at 2:29 AM Nikolay Amiantov wrote: > I play ioquake3 successfully. It needs the following to work: > > 1. Extract pak0.pk3 file from the original Quake 3 Arena. > 2. Use Nix script like this: > > { nixpkgs ? import { } }: > > let > paks = nixpkgs.stdenv.mkDerivation { > name = "quake3-arena"; > pak0 = ./baseq3/pak0.pk3; # Replace this with path to your file > buildCommand = '' > install -D -m644 $pak0 $out/baseq3/pak0.pk3; > ''; > }; > in nixpkgs.quake3wrapper { > paks = [ paks nixpkgs.quake3pointrelease ]; > } > > 3. Run `nix-build` on it: `nix-build script.nix` > 4. `result/bin/quake3` would run the game. > > This probably needs to be added to our manual and/or improved somehow. > > For the development, however, you can just run `nix-shell` as advised by > Emery -- it would get you all the game dependencies, so you can use > conventional tools (make/cmake/gcc/whatever ioquake3 wants) inside the > shell. > > On 04/08/2016 11:17 AM, Emery wrote: > > If you could get ioquake working well, I and I'm sure a few others > > would be grateful. > > > > If ioquake is an engine, I would recommend keeping the engine in one > > package. If you can find game data that can be downloaded easily, that > > can be a second package that depends on ioquake, so you could install a > > wrapper script that combines the nix path of the engine with the nix > > path of the game data. Just make sure you attach the proper license to > > the data. > > > > As for developing, you can clone the ioquake sources and get a shell > > that contains the dependencies from the package with: > > nix-shell ' > > > If you want to use a locally modified ioquake package, use: > > nix-shell /path/to/local/nixpkgs -A ioquake > > > > > > Good luck, > > Emery > > > > > > On Fri, Apr 08, 2016 at 05:27:04AM +, Máté Kovács wrote: > >> Hi Nixers, > >> > >> I'd like to play (and develop) ioquake3 on NixOS. > >> > >> I see that it should be available in nixpkgs, based on > >> > https://github.com/NixOS/nixpkgs/commit/7fc7502db516a54d8104656401f0c2abf90cf781 > >> . > >> > >> I have ioquake3 installed, but I don't know where to go from here. > >> I know that I need to copy the original game data to some location to be > >> able to play the game. > >> What do I need to do next? > >> > >> Thanks, > >> Mate > > -- > Nikolay. > ___ > nix-dev mailing list > nix-dev@lists.science.uu.nl > http://lists.science.uu.nl/mailman/listinfo/nix-dev > ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] ioquake3 on nixos
Thanks Nikolay! :) On Fri, Apr 8, 2016 at 2:29 AM Nikolay Amiantov wrote: > I play ioquake3 successfully. It needs the following to work: > > 1. Extract pak0.pk3 file from the original Quake 3 Arena. > 2. Use Nix script like this: > > { nixpkgs ? import { } }: > > let > paks = nixpkgs.stdenv.mkDerivation { > name = "quake3-arena"; > pak0 = ./baseq3/pak0.pk3; # Replace this with path to your file > buildCommand = '' > install -D -m644 $pak0 $out/baseq3/pak0.pk3; > ''; > }; > in nixpkgs.quake3wrapper { > paks = [ paks nixpkgs.quake3pointrelease ]; > } > > 3. Run `nix-build` on it: `nix-build script.nix` > 4. `result/bin/quake3` would run the game. > > This probably needs to be added to our manual and/or improved somehow. > > For the development, however, you can just run `nix-shell` as advised by > Emery -- it would get you all the game dependencies, so you can use > conventional tools (make/cmake/gcc/whatever ioquake3 wants) inside the > shell. > > On 04/08/2016 11:17 AM, Emery wrote: > > If you could get ioquake working well, I and I'm sure a few others > > would be grateful. > > > > If ioquake is an engine, I would recommend keeping the engine in one > > package. If you can find game data that can be downloaded easily, that > > can be a second package that depends on ioquake, so you could install a > > wrapper script that combines the nix path of the engine with the nix > > path of the game data. Just make sure you attach the proper license to > > the data. > > > > As for developing, you can clone the ioquake sources and get a shell > > that contains the dependencies from the package with: > > nix-shell ' > > > If you want to use a locally modified ioquake package, use: > > nix-shell /path/to/local/nixpkgs -A ioquake > > > > > > Good luck, > > Emery > > > > > > On Fri, Apr 08, 2016 at 05:27:04AM +, Máté Kovács wrote: > >> Hi Nixers, > >> > >> I'd like to play (and develop) ioquake3 on NixOS. > >> > >> I see that it should be available in nixpkgs, based on > >> > https://github.com/NixOS/nixpkgs/commit/7fc7502db516a54d8104656401f0c2abf90cf781 > >> . > >> > >> I have ioquake3 installed, but I don't know where to go from here. > >> I know that I need to copy the original game data to some location to be > >> able to play the game. > >> What do I need to do next? > >> > >> Thanks, > >> Mate > > -- > Nikolay. > ___ > nix-dev mailing list > nix-dev@lists.science.uu.nl > http://lists.science.uu.nl/mailman/listinfo/nix-dev > ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] ioquake3 on nixos
I play ioquake3 successfully. It needs the following to work: 1. Extract pak0.pk3 file from the original Quake 3 Arena. 2. Use Nix script like this: { nixpkgs ? import { } }: let paks = nixpkgs.stdenv.mkDerivation { name = "quake3-arena"; pak0 = ./baseq3/pak0.pk3; # Replace this with path to your file buildCommand = '' install -D -m644 $pak0 $out/baseq3/pak0.pk3; ''; }; in nixpkgs.quake3wrapper { paks = [ paks nixpkgs.quake3pointrelease ]; } 3. Run `nix-build` on it: `nix-build script.nix` 4. `result/bin/quake3` would run the game. This probably needs to be added to our manual and/or improved somehow. For the development, however, you can just run `nix-shell` as advised by Emery -- it would get you all the game dependencies, so you can use conventional tools (make/cmake/gcc/whatever ioquake3 wants) inside the shell. On 04/08/2016 11:17 AM, Emery wrote: > If you could get ioquake working well, I and I'm sure a few others > would be grateful. > > If ioquake is an engine, I would recommend keeping the engine in one > package. If you can find game data that can be downloaded easily, that > can be a second package that depends on ioquake, so you could install a > wrapper script that combines the nix path of the engine with the nix > path of the game data. Just make sure you attach the proper license to > the data. > > As for developing, you can clone the ioquake sources and get a shell > that contains the dependencies from the package with: > nix-shell ' > If you want to use a locally modified ioquake package, use: > nix-shell /path/to/local/nixpkgs -A ioquake > > > Good luck, > Emery > > > On Fri, Apr 08, 2016 at 05:27:04AM +, Máté Kovács wrote: >> Hi Nixers, >> >> I'd like to play (and develop) ioquake3 on NixOS. >> >> I see that it should be available in nixpkgs, based on >> https://github.com/NixOS/nixpkgs/commit/7fc7502db516a54d8104656401f0c2abf90cf781 >> . >> >> I have ioquake3 installed, but I don't know where to go from here. >> I know that I need to copy the original game data to some location to be >> able to play the game. >> What do I need to do next? >> >> Thanks, >> Mate -- Nikolay. ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev
Re: [Nix-dev] ioquake3 on nixos
If you could get ioquake working well, I and I'm sure a few others would be grateful. If ioquake is an engine, I would recommend keeping the engine in one package. If you can find game data that can be downloaded easily, that can be a second package that depends on ioquake, so you could install a wrapper script that combines the nix path of the engine with the nix path of the game data. Just make sure you attach the proper license to the data. As for developing, you can clone the ioquake sources and get a shell that contains the dependencies from the package with: nix-shell ' Hi Nixers, > > I'd like to play (and develop) ioquake3 on NixOS. > > I see that it should be available in nixpkgs, based on > https://github.com/NixOS/nixpkgs/commit/7fc7502db516a54d8104656401f0c2abf90cf781 > . > > I have ioquake3 installed, but I don't know where to go from here. > I know that I need to copy the original game data to some location to be > able to play the game. > What do I need to do next? > > Thanks, > Mate pgpTO8kLJ05bV.pgp Description: PGP signature ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev