# Install package from git commit hash

**URL:** <https://discourse.flox.dev/t/install-package-from-git-commit-hash/430>\
**Category:** Help\
**Created:** [October 19, 2022, 6:50pm UTC](https://discourse.flox.dev/t/install-package-from-git-commit-hash/430 "2022-10-19T18:50:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![fleimgruber](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/fleimgruber/32/400_2.png) [@fleimgruber](https://discourse.flox.dev/u/fleimgruber)\
**Post date:** [October 19, 2022, 6:50pm UTC](https://discourse.flox.dev/t/install-package-from-git-commit-hash/430/1 "2022-10-19T18:50:59Z")

</div>

I am able to install unstable packages by version as in `flox install unstable.nixpkgs-flox.jabref@5.6`, but for a fix that does not bump the package version, the package is not rebuilt on flox hydra(?) apparently, i.e. I still see the error that should be fixed by [jabref: add GSettings schemas path by linsui · Pull Request #185019 · NixOS/nixpkgs · GitHub](https://github.com/NixOS/nixpkgs/pull/185019).

Is it possible to install a nix package by a specific git commit hash and if so how best to do it?

---

<div class="post-metadata">

**Author:** ![limeytexan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/limeytexan/32/10_2.png) [@limeytexan](https://discourse.flox.dev/u/limeytexan)\
**Post date:** [October 22, 2022, 10:49am UTC](https://discourse.flox.dev/t/install-package-from-git-commit-hash/430/2 "2022-10-22T10:49:16Z")

</div>

Thanks for your question. We’ll add a note to make this more clear in the documentation for Nix experts, but the short answer is that flox supports flake URLs and you can invoke:

```auto
flox install nixpkgs/4668b9a35aa32041c13ed66cad965a7c19200cfc#jabref

```

Of course that package will in effect be pinned and `flox upgrade` won’t be able to upgrade it, so once that patch appears in our [unstable branch](https://github.com/flox/nixpkgs/tree/unstable) (next Thursday) I would recommend replacing it with `unstable.nixpkgs-flox.jabref` so that it can be easily upgraded thereafter.

Please let us know how it goes, and thanks again for the feedback!

---

<div class="post-metadata">

**Author:** ![limeytexan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/limeytexan/32/10_2.png) [@limeytexan](https://discourse.flox.dev/u/limeytexan)\
**Post date:** [October 22, 2022, 11:30am UTC](https://discourse.flox.dev/t/install-package-from-git-commit-hash/430/3 "2022-10-22T11:30:15Z")

</div>

Actually … I provided the above answer assuming that the patch you requested hadn’t been merged to our unstable branch but it looks like it was merged long ago - long enough that it has already propagated to the stable branch. Let me investigate the status of that package in the catalog and get back to you, but either the above flake reference or `flox install nixpkgs#jabref` should work in the meantime.

---

<div class="post-metadata">

**Author:** ![fleimgruber](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/fleimgruber/32/400_2.png) [@fleimgruber](https://discourse.flox.dev/u/fleimgruber)\
**Post date:** [October 22, 2022, 12:09pm UTC](https://discourse.flox.dev/t/install-package-from-git-commit-hash/430/4 "2022-10-22T12:09:06Z")

</div>

Thanks for checking back, your answer and investigating this. The flox version I use is `0.0.5-r31`.

---

<div class="post-metadata">

**Author:** ![fleimgruber](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/fleimgruber/32/400_2.png) [@fleimgruber](https://discourse.flox.dev/u/fleimgruber)\
**Post date:** [October 22, 2022, 8:36pm UTC](https://discourse.flox.dev/t/install-package-from-git-commit-hash/430/5 "2022-10-22T20:36:35Z")

</div>

I was able to get the correct and expected version with `flox install nixpkgs#jabref` so solved for me - thanks!

---

<div class="post-metadata">

**Author:** ![limeytexan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/limeytexan/32/10_2.png) [@limeytexan](https://discourse.flox.dev/u/limeytexan)\
**Post date:** [October 26, 2022, 9:06am UTC](https://discourse.flox.dev/t/install-package-from-git-commit-hash/430/6 "2022-10-26T09:06:08Z")

</div>

Just a quick follow-up to say we’ve found and fixed the problem with the catalog so the latest versions of “jabref” are now available across all stabilities:

```auto
[brantley@clubsoda:~/src/flox-internal]$ flox search jabref 
jabref - Open source bibliography reference manager
  stable.nixpkgs-flox.jabref@5.1
  stable.nixpkgs-flox.jabref@5.5
  stable.nixpkgs-flox.jabref@5.6
  staging.nixpkgs-flox.jabref@5.5
  staging.nixpkgs-flox.jabref@5.6
  staging.nixpkgs-flox.jabref@5.7
  unstable.nixpkgs-flox.jabref@5.5
  unstable.nixpkgs-flox.jabref@5.6
  unstable.nixpkgs-flox.jabref@5.7

```

With that my recommendation is that you invoke `flox edit` to replace the flakeref with the equivalent floxpkgs tuple so that `flox upgrade` will work for you in future. Just search for and replace the “jabref” stanza with the following:

```auto
  [packages."jabref"]
  channel = "nixpkgs-flox"
  stability = "stable"

```

Hope this helps!

---

<div class="post-metadata">

**Author:** ![fleimgruber](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/fleimgruber/32/400_2.png) [@fleimgruber](https://discourse.flox.dev/u/fleimgruber)\
**Post date:** [October 26, 2022, 10:20am UTC](https://discourse.flox.dev/t/install-package-from-git-commit-hash/430/7 "2022-10-26T10:20:45Z")

</div>

Thanks for letting me know, done!
