Skip to content

Commit

Permalink
Merge pull request #42 from numtide/fix-cachix
Browse files Browse the repository at this point in the history
  • Loading branch information
zimbatm authored Jul 27, 2024
2 parents baa3ee1 + 882ab89 commit 7bde5d8
Show file tree
Hide file tree
Showing 62 changed files with 5,061 additions and 194 deletions.
6 changes: 3 additions & 3 deletions api/unpack/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"path/filepath"
"strings"

"github.com/nix-community/go-nix/pkg/nar"
"github.com/nix-community/go-nix/pkg/narinfo"
"github.com/numtide/nar-serve/libstore"
"github.com/numtide/nar-serve/pkg/libstore"
"github.com/numtide/nar-serve/pkg/nar"
"github.com/numtide/nar-serve/pkg/narinfo"

"github.com/ulikunitz/xz"
)
Expand Down
11 changes: 7 additions & 4 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{ system ? builtins.currentSystem
, nixpkgs ? import <nixpkgs> { inherit system; }
}:
{
system ? builtins.currentSystem,
nixpkgs ? import <nixpkgs> { inherit system; },
}:
rec {
nar-serve = nixpkgs.buildGoModule {
pname = "nar-serve";
version = "latest";
src = nixpkgs.lib.cleanSource ./.;
vendorHash = "sha256-HTWCOnK81xLP0HKcpmzGlkexIl3s6p1d9aYCx3fz5x4=";
vendorHash = "sha256-KZ7dOwx52+2ljfedAMUR1FRv3kAO7Kl4y6wvjJeWdKc=";
doCheck = false;
};

default = nar-serve;

devShell = import ./shell.nix { inherit nixpkgs; };
}
37 changes: 11 additions & 26 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 25 additions & 15 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
{
description = "NAR serve";

inputs.flake-utils.url = "github:numtide/flake-utils";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
systems.url = "github:nix-systems/default";
};

outputs = { self, nixpkgs, flake-utils }:
outputs =
{
overlay = import ./overlay.nix;
}
//
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
rec {
packages = import ./. { nixpkgs = pkgs; };
defaultPackage = packages.nar-serve;
devShell = packages.devShell;
}
);
self,
nixpkgs,
systems,
}:
let
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
in
{
overlays.default = import ./overlay.nix;

packages = eachSystem (pkgs: import ./. { nixpkgs = pkgs; });

formatter = eachSystem (pkgs: pkgs.nixfmt-rfc-style);

devShells = eachSystem (pkgs: {
default = self.packages.${pkgs.system}.devShell;
});

checks = self.packages;
};
}
68 changes: 31 additions & 37 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,59 +1,53 @@
module github.com/numtide/nar-serve

go 1.19
go 1.21

toolchain go1.22.5

require (
cloud.google.com/go/storage v1.39.0
github.com/aws/aws-sdk-go v1.50.30
github.com/nix-community/go-nix v0.0.0-20231219074122-93cb24a86856
cloud.google.com/go/storage v1.43.0
github.com/aws/aws-sdk-go v1.55.3
github.com/google/go-cmp v0.6.0
github.com/stretchr/testify v1.9.0
github.com/ulikunitz/xz v0.5.12
github.com/urfave/negroni v1.0.0
)

require (
cloud.google.com/go v0.112.0 // indirect
cloud.google.com/go/compute v1.24.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.6 // indirect
cloud.google.com/go v0.115.0 // indirect
cloud.google.com/go/auth v0.7.2 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.3 // indirect
cloud.google.com/go/compute/metadata v0.5.0 // indirect
cloud.google.com/go/iam v1.1.12 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/s2a-go v0.1.8 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.1 // indirect
github.com/googleapis/gax-go/v2 v2.13.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/minio/sha256-simd v1.0.0 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/multiformats/go-multihash v0.2.1 // indirect
github.com/multiformats/go-varint v0.0.6 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0 // indirect
go.opentelemetry.io/otel v1.23.0 // indirect
go.opentelemetry.io/otel/metric v1.23.0 // indirect
go.opentelemetry.io/otel/trace v1.23.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/oauth2 v0.17.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/api v0.166.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240221002015-b0ce06bbee7c // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240213162025-012b6fc9bca9 // indirect
google.golang.org/grpc v1.61.1 // indirect
google.golang.org/protobuf v1.33.0 // indirect
google.golang.org/api v0.189.0 // indirect
google.golang.org/genproto v0.0.0-20240725223205-93522f1f2a9f // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240725223205-93522f1f2a9f // indirect
google.golang.org/grpc v1.65.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.1.6 // indirect
)
Loading

0 comments on commit 7bde5d8

Please sign in to comment.