about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tools/nixery/popcount/default.nix14
1 files changed, 6 insertions, 8 deletions
diff --git a/tools/nixery/popcount/default.nix b/tools/nixery/popcount/default.nix
index 4a3c8faf9c..bd695380cf 100644
--- a/tools/nixery/popcount/default.nix
+++ b/tools/nixery/popcount/default.nix
@@ -12,15 +12,13 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{ go, stdenv }:
+{ buildGoPackage }:
 
-stdenv.mkDerivation {
+buildGoPackage {
   name = "nixery-popcount";
 
-  buildInputs = [ go ];
-  phases = [ "buildPhase" ];
-  buildPhase = ''
-    mkdir -p $out/bin
-    go build -o $out/bin/popcount ${./popcount.go}
-  '';
+  src = ./.;
+
+  goPackagePath = "github.com/google/nixery/popcount";
+  doCheck = true;
 }