Fix the way source code is fetched for matrix-media-repo
This commit is contained in:
parent
2c044834ca
commit
5353ee4314
3 changed files with 15 additions and 1 deletions
|
@ -5,7 +5,7 @@ in {
|
|||
matrix-media-repo = buildGoApplication rec {
|
||||
pname = "matrix-media-repo";
|
||||
version = inputs.matrix-media-repo.lastModifiedDate;
|
||||
src = inputs.matrix-media-repo;
|
||||
src = pkgs.callPackage ./source.nix {};
|
||||
patches = [
|
||||
./async-media.patch
|
||||
];
|
||||
|
|
6
matrix/matrix-media-repo/source.nix
Normal file
6
matrix/matrix-media-repo/source.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{fetchgit}:
|
||||
fetchgit {
|
||||
url = "https://github.com/turt2live/matrix-media-repo";
|
||||
revision = "3184dbc7720fc103aaf4704be894eac69535e887";
|
||||
sha256 = "1j6y7alr60mmj5h014qmpz9a5qjv8cm61andwdacb0dqjjbvsm0z";
|
||||
}
|
|
@ -18,5 +18,13 @@ JSON=$(nix-prefetch-git --url "$URL" --rev "$REVISION" 2> $WORK_DIR/nix-prefetc
|
|||
SHA=$(echo $JSON | jq -r .sha256)
|
||||
SOURCE_DIR=$(grep '^path is' $WORK_DIR/nix-prefetch-git.out | sed 's/^path is //')
|
||||
|
||||
cat > source.nix << EOF
|
||||
{ fetchgit }: fetchgit {
|
||||
url = "$URL";
|
||||
revision = "$REVISION";
|
||||
sha256 = "$SHA";
|
||||
}
|
||||
EOF
|
||||
|
||||
echo "Creating gomod2nix.toml"
|
||||
nix run github:tweag/gomod2nix -- -dir $SOURCE_DIR -outdir $TARGET_DIR
|
||||
|
|
Reference in a new issue