Created
September 13, 2023 16:58
-
-
Save adamdicarlo0/7c639618ac5546d55f87024277148e0d to your computer and use it in GitHub Desktop.
aws-sam-cli nix flake to update to newer version
This file contains hidden or 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
{ | |
description = "CLI tool for local development and testing of Serverless applications"; | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | |
flake-parts.url = "github:hercules-ci/flake-parts"; | |
}; | |
outputs = inputs@{ flake-parts, nixpkgs, ... }: | |
flake-parts.lib.mkFlake { inherit inputs; } { | |
imports = []; | |
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ]; | |
perSystem = { config, self', inputs', pkgs, system, lib, ... }: | |
# Per-system attributes can be defined here. The self' and inputs' | |
# module parameters provide easy access to attributes of the same | |
# system. | |
{ | |
# The definition of the aws-sam-cli package in nixpkgs is here: | |
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/aws-sam-cli/default.nix | |
packages.default = pkgs.aws-sam-cli.overridePythonAttrs (old: rec { | |
# the executable is just "sam" | |
pname = "sam"; | |
version = "1.97.0"; | |
# Redefine which version (and sha256-sum) to use for the build. | |
src = pkgs.python3.pkgs.fetchPypi { | |
pname = "aws-sam-cli"; | |
inherit version; | |
hash = "sha256-IEt8JA3iS0ZhaTEKeHNJLKLOOfD2Q3RYZ2Y61upi/xs="; | |
}; | |
}); | |
}; | |
flake = {}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment