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

Devenv installing older package version of Gitea #1304

Closed
bachirelkhoury opened this issue Jun 27, 2024 · 5 comments
Closed

Devenv installing older package version of Gitea #1304

bachirelkhoury opened this issue Jun 27, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@bachirelkhoury
Copy link

Describe the bug
devenv search gitea is showing gitea version 1.22.0
However when starting the shell with pkgs.gitea version 1.21.10 is getting installed instead.

To reproduce

Init the dev environment:

$ mkdir test-devenv && cd $_
$ devenv init
$ devenv search gitea

# Output
| pkgs.gitea | 1.22.0  | Git with a cup of tea  |

Add pkgs.gitea to devenv.nix

{ pkgs, lib, config, inputs, ... }:

{
  # https://devenv.sh/basics/
  env.GREET = "devenv";

  # https://devenv.sh/packages/
  packages = [ pkgs.git pkgs.gitea ];

  # https://devenv.sh/scripts/
  scripts.hello.exec = "echo hello from $GREET";

  enterShell = ''
    hello
    git --version
  '';

  # https://devenv.sh/tests/
  enterTest = ''
    echo "Running tests"
    git --version | grep "2.42.0"
  '';
}
$ devenv shell
$ gitea --version
# Output
Gitea version 1.21.10 built with go1.22.1

Version
I tried on both macOS and Ubuntu same issue:

devenv 1.0.7 (aarch64-darwin)
devenv 1.0.7 (x86_64-linux)

@bachirelkhoury bachirelkhoury added the bug Something isn't working label Jun 27, 2024
@k3yss
Copy link
Collaborator

k3yss commented Jun 29, 2024

This is because of the devenv-nixpkgs that we provide, which seems to be slowing becoming outdated. You can try switching to unstable channel to get the latest version.

@bachirelkhoury
Copy link
Author

Great thanks that worked... at the end we ended up switching to Forgejo.

@MalteMagnussen
Copy link

MalteMagnussen commented Sep 3, 2024

This is because of the devenv-nixpkgs that we provide, which seems to be slowing becoming outdated. You can try switching to unstable channel to get the latest version.

@k3yss - What does that mean, and how do I switch?


I figured it out:

devenv.yaml

inputs:
  nixpkgs-python:
    url: github:cachix/nixpkgs-python
    inputs:
      nixpkgs:
        follows: nixpkgs
  nixpkgs:
    url: github:NixOS/nixpkgs/nixpkgs-unstable  # Update this line

@bachirelkhoury - Next time, please don't just say "Thanks that worked" without any hint of how to do it lol

@k3yss
Copy link
Collaborator

k3yss commented Sep 3, 2024

@MalteMagnussen I made a pr to include it in the documentation #1411

@MalteMagnussen
Copy link

@k3yss thanks man

switching fixed a lot of issues with outdated versions for us

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants