Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dwarf Fortress refactors #43085

Merged
merged 4 commits into from Jul 9, 2018
Merged

Conversation

matthewbauer
Copy link
Member

/cc @Baughn

This avoids creating a second derivation to copy things from the
original. The new themes are now fixed output.
@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


baseVersion = elemAt dfVersionTriple 1;
patchVersion = elemAt dfVersionTriple 2;

games = fromJSON (readFile ./game.json);
Copy link
Contributor

Choose a reason for hiding this comment

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

builtins.fromJSON to fix eval

@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@numinit
Copy link
Contributor

numinit commented Jul 8, 2018

Should this take into account the correct versions of unfuck and dfhack to use for each DF version?

Generally their releases follow DF versions, except for the build bug we found that prevented unfuck from loading when dfhack was enabled, so we'd actually use 0.44.11.1 for version 0.44.11 (ugh):

So, maybe a structure like this would work for the JSON:

"0.44.11": {
    "linux": "<linux hash>",
    "linux32": "<linux32 hash>",
    "osx": "<osx hash>",
    "osx32": "<osx32 (people still use that?) hash>",
    "dfhackVersion": "0.44.11-beta2.1",
    "unfuckVersion": "0.44.11.1"
}

And, that way, if we wanted to do an experimental release without dfhack, it'd look something like this:

"0.44.12": {
    "linux": "<linux hash>",
    "linux32": "<linux32 hash>",
    "osx": "<osx hash>",
    "osx32": "<osx32 (people still use that?) hash>",
    "dfhackVersion": null,
    "unfuckVersion": "0.44.12"
}

Also, 0.44.12 is out as of today, so here we go again. Want to avoid submitting any changes to the package until this is merged, since this looks like a better structure for picking the version to install.

@matthewbauer
Copy link
Member Author

Yeah will update for 0.44.12

I think putting more info in the .json format is probably not good. This is just meant to select the right source format for you. The dfhackVersion & unfuckVersion logic should be done in the dfhack & unfuck expressions. That is what the 'compatible' thing is supposed to be doing already.

@matthewbauer matthewbauer changed the title Dwarf fortress tweaks Dwarf Fortress refactors Jul 8, 2018
@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@Baughn
Copy link
Contributor

Baughn commented Jul 9, 2018

Given there are multiple PRs pending on this one, wouldn't it be best to merge the refactor as-is and add the version bump separately? Or is something still broken?

game.json now contains a dictionary of old game hashes. I have added
them for the last 3 releases.

- add script to generate hashes

  Makes it much easier to update game.json file.

- add updateScript meta

  This adds some info on the ./update.sh updateScript now available.

- cleanup updateScript

  - Add some more systems
  - Correctly detect source extensions (.zip or .tar.bz2)
  - Proper bash quoting

- fix update.sh

  - correctly detect latest df version
  - append to game.json instead of overwriting it

- update hashes for 44.12
This will make it easier for people to access old versions.

You can now access attributes like:

- dwarf-fortress_0_44_11
- dwarf-fortress_0_43_05
- etc.
Now the output of “nix-env” should be:

$ nix-env -qa -f . -A dwarf-fortress-packages
afro-graphics-44.10
autoreiv-44.03
cla-44.xx-v25
dwarf-fortress-0.43.05
dwarf-fortress-0.44.05
dwarf-fortress-0.44.09
dwarf-fortress-0.44.10
dwarf-fortress-0.44.11
dwarf-fortress-0.44.12
dwarf-therapist-40.1.0
gemset-44.10a
ironhand-44.10
jolly-bastion-44.10
legends-browser-1.17.1
mayday-44.10
obsidian-44.10
phoebus-44.10
rally-ho-44.10
soundsense-2016-1_196
spacefox-44.10a
taffer-44.10a
tergel-44.03
wanderlust-44.10
@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@matthewbauer matthewbauer merged commit 97605d3 into NixOS:master Jul 9, 2018
@matthewbauer
Copy link
Member Author

matthewbauer commented Jul 9, 2018

Yeah that makes sense.

@matthewbauer
Copy link
Member Author

Note that this is still on 0.44.11. It should be a one line diff to switch to the newest though:

https://github.com/NixOS/nixpkgs/blob/master/pkgs/games/dwarf-fortress/default.nix#L16

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: dwarf-fortress

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@@ -0,0 +1,86 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

How many of these versions do we need in nixpkgs? And what is the criteria to, which versions we add?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can probably delete some... Last 1-2 are usually compatible with all of the tools. Sometimes people play on older ones because new versions break save files.

@jtojnar
Copy link
Contributor

jtojnar commented Jun 1, 2019

Running nix-shell maintainers/scripts/update.nix --argstr path dwarf-fortress does not work:

/nix/store/2knjz3r0cj05j6714jgmzhclrri4canp-update.sh: line 41: $(dirname "$0")/game.json: No such file or directory
/nix/store/2knjz3r0cj05j6714jgmzhclrri4canp-update.sh: line 42: $(dirname "$0")/game.json: Read-only file system

see #61935 (comment)

@jtojnar
Copy link
Contributor

jtojnar commented Jun 1, 2019

Hmm. Apparently, he failure comes from the JSONification in https://github.com/NixOS/nixpkgs/pull/50977/files#diff-068de29b3fc79aa673d4a7f25f8ee9fbR142

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

Successfully merging this pull request may close these issues.

None yet

7 participants