-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for updating Mix dependencies for Elixir projects
- Loading branch information
1 parent
2c1937e
commit f6f817b
Showing
6 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import subprocess | ||
|
||
import conftest | ||
|
||
from nix_update.options import Options | ||
from nix_update.update import update | ||
|
||
|
||
def test_update(helpers: conftest.Helpers) -> None: | ||
with helpers.testpkgs() as path: | ||
opts = Options(attribute="mix", import_path=str(path)) | ||
update(opts) | ||
mix_hash = subprocess.run( | ||
[ | ||
"nix", | ||
"eval", | ||
"--raw", | ||
"--extra-experimental-features", | ||
"nix-command", | ||
"-f", | ||
path, | ||
"mix.mixFodDeps.outputHash", | ||
], | ||
text=True, | ||
stdout=subprocess.PIPE, | ||
).stdout.strip() | ||
assert mix_hash != "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ beamPackages, fetchFromGitHub }: | ||
|
||
beamPackages.mixRelease rec { | ||
pname = "credo-language-server"; | ||
version = "0.2.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "elixir-tools"; | ||
repo = "credo-language-server"; | ||
rev = "refs/tags/v${version}"; | ||
hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; | ||
}; | ||
|
||
mixFodDeps = beamPackages.fetchMixDeps { | ||
inherit pname version src; | ||
hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; | ||
}; | ||
} |